javascript - JQuery Search for part of span class name -


if have span class called "peanutty", , "peanuts", can search "peanut*"?

you can try:

$('span[class^="peanut"]') 

jsfiddle example

see jquery's attribute starts selector.


Comments

Popular posts from this blog

How can I fetch data from a web server in an android application? -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -

jquery - How can I dynamically add a browser tab? -