开发者

How to select this via jQuery (include text in selector)?

开发者 https://www.devze.com 2023-01-16 11:55 出处:网络
What is a safe and reliable way to select the link below? I am having trouble to ensure I include the \"Select\" text in the select开发者_JS百科or to ensure I do not select another link:

What is a safe and reliable way to select the link below? I am having trouble to ensure I include the "Select" text in the select开发者_JS百科or to ensure I do not select another link:

<span class="pickerWrapper">....<a href="...">Select</a></span>


You will need to use the contains selector.

$(".pickerWrapper a:contains('Select')");


$('.class a:contains("Select"):last')

http://jsfiddle.net/WwSNb/


jQuery(".pickerWrapper a:last") should work

0

精彩评论

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