jquery查询 某个属性值的元素集合
<ulclass="fcbj-d-list">
<liclass="ond01"data-v="2017-10-01"data-m="2017-10">1<i>预约</i></li>
<liclass="ond02"data-v="2017-10-02"data-m="2017-10">2<i>预约</i></li>
<liclass="ond03"data-v="2017-10-03"data-m="2017-10">3<i>预约</i></li>
<liclass="ond04"data-v="2017-10-04"data-m="2017-10">4<i>预约</i></li>
<liclass="ond05"data-v="2017-10-05"data-m="2017-10">5<i>预约</i></li>
<liclass="ond06"data-v="2017-10-06"data-m="2017-10">6<i>预约</i></li>
</ul>
找出所有li具有data-m="2017-10"的元素
$('.j-d-list').find($('li[data-m="2017-10"]'))
给这些元素增加样式
$('.j-d-list').find($('li[data-m="'+switchMonth+'"]')).removeClass('on').addClass('off').find('i').text('');
相关推荐
EdwardSiCong 2020-11-23
85477104 2020-11-17
hhanbj 2020-11-17
81427005 2020-11-11
seoppt 2020-09-13
honeyth 2020-09-13
WRITEFORSHARE 2020-09-13
84483065 2020-09-11
momode 2020-09-11
85477104 2020-08-15
83510998 2020-08-08
82550495 2020-08-03
tthappyer 2020-08-03
84901334 2020-07-28
tthappyer 2020-07-25
TONIYH 2020-07-22
tztzyzyz 2020-07-20
83510998 2020-07-18
81463166 2020-07-17