how can i add a class to some images based on the alt text using jquery?
here is an example of the image:
so if the alt text contains "Show Picture" then add a class of `image-nav` Ran performance of the solutions here: jsperf.com/test-selector-vs-filter. Chrome surprises me.
以上就是adding a class to some images based on the alt text using jquery?的详细内容,更多请关注web前端其它相关文章!