<span class="switchery switchery-small" style="box-shadow: rgb(223, 223, 223) 0px 0px 0px 0px inset; border-color: rgb(223, 223, 223); transition: border 0.4s, box-shadow 0.4s; background-color: rgb(255, 255, 255);">
<small style="left: 0px; transition: background-color 0.4s, left 0.2s;"></small>
</span>
我正在使用插件並生成上面的代碼。我如何選擇它的左邊是0px的小標籤的切換臺?具有「left:0px」的元素上的綁定事件
我寫這
if ($('.switchery').find('small').attr('style').indexOf('0px') > -1) {
}
,但我怎麼能申請click()
我的比賽元素。
哇不知道過濾器可用於這個樣子!真棒!但使用.css('顏色',綠色)是否是苛刻的?那個有什麼用途? –
@JenniferAniston這只是爲了Demo的目的。給視覺線索返回「過濾器」的結果。 – Tushar
所以沒關係.css()不在那裏? –