javascript - Remove text from a p tag and add a class with jquery -
what i'm triying accomplish there's p tag word "border" on it remove text inside (the word border) , add class p. far works finding p , adding class. how can remove text?
$('#main-body-content').find('p').filter(':contains(border)').addclass("border");
try this......
$('#main-body-content').find('p').filter(':contains(border)').text("").addclass("border");
Comments
Post a Comment