开发者

find the value of psudo class variable in javascript

开发者 https://www.devze.com 2023-03-21 02:30 出处:网络
hey every one I want to alert value of n from this string $(\'.or开发者_高级运维bit-bullets:has( > li.active:nth-child)\');

hey every one I want to alert value of n from this string

$('.or开发者_高级运维bit-bullets:has( > li.active:nth-child)');


If you want the index of a li with the class active inside an element with the class orbit-bullits you could do something like this:

$('.orbit-bullets>li.active').index()

this will return a 0-based index

0

精彩评论

暂无评论...
验证码 换一张
取 消