JQuery - How to add a single html tag to some html?
- by Keith Donegan
Hey Guys,
I want to insert just a single <span> before the text below (right before LINK):
<li><a href="">LINK</a></li>
So, the above becomes
<li><a href=""><span>LINK</a></li>
Here is my JQuery Code:
$('#mainnav li a').prepend('<span>');
When I view the code in firebug after, I see , how do I just get the opening span tag and not the closing tag?