javascript - how to loop through anchor tags in a variable using Jquery -


i have js variable

var content = "<p><a href="http://www.wikipedia.org">wiki</a></p>"; 

i need add class anchor tag.

is possible in jquery ?

you can use:

$(content).find('a').addclass('myclass'); 

Comments

Popular posts from this blog

python 2.7 - Chat Solution for Mobile App -

jquery - Detect current Section with javascript -