Javascript获取活动菜单项data-option-value并将其放入VAR

时间:2013-12-20 00:16:34

标签: javascript class attributes jquery-isotope var

    <div class="option-combo department">  
   <span class="label_menu">Department:</span>  
   <ul id="filters" class="option-set clearfix" data-option-key="filter">  
    <li class="department-button"><a href="#" id="all" data-option-value=":not(.comm)">All</a></li> 
    <li class="department-button"><a href="#" id="sales" data-option-value=".sales:not(.comm)">Sales</a></li>   
    <li class="department-button"><a href="#" id="market" data-option-value=".market:not(.comm)">Marketing</a></li>  
    <li class="department-button"><a href="#" id="training" data-option-value=".training:not(.comm)">Training</a></li> 
    <li class="department-button"><a href="#" data-option-value=".comm">Communications</a></li> 
   </ul> 
   </div>

我想获取活动列表项属性data-option-value,并将其动态添加到commiunication data-option-value

我正在使用同位素

1 个答案:

答案 0 :(得分:0)

尝试此操作以过滤掉其他类,只显示每个部门的具体通信

<li class="department-button"><a href="#" data-option-value=".market.comm">Communications</a></li>