JQuery: how to write a selector to find elements with a class ending with a given substring?
Posted
by
curious1
on Stack Overflow
See other posts from Stack Overflow
or by curious1
Published on 2013-07-02T04:36:20Z
Indexed on
2013/07/02
5:05 UTC
Read the original article
Hit count: 109
I use JQuery for my web application. I don't know how to write a selector for this situation.
<a class="abc def xyz-delete-confirm efg">text</a>
<a class="abc def delete-confirm">text</a>
I need to find all links that has a class ending with "-delete-confirm" or has a class called "delete-confirm".
I know how to handle the situation of having a class called "delete-confirm". How about the "-delete-confirm situation"? Can I have a single selector covering two situations?
Thanks for any input!
Regards.
© Stack Overflow or respective owner