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

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -