I’ve got a question regarding jQuery, I want to remove the following from the an object ($website) that stores the
$website.html().remove('a');
$website.html() returns = egg street eggland eg1 <a href="random">
<img src=""></img>
</a>
How would I remove a element and its contents ?
I have tried
$website.remove('a');
But this doesn’t seem to remove anything..
Please could you point me in the right direction if I am doing this completely wrong..
Thank
Basically finds all anchor tags withing
$websiteand removes them.Reverse (based on comment below by OP):
Basically finds all things in
$websitethat are not anchor tags and removes them.