I have a label inside the link tag. I did it for purpose to reference some other script. I want to remove just the hyperlink for that label.
<a href="/" title="Go to homepage">
<label for="enr_rds_batch_update_Section" id="section">Section</label>
<img alt="Look up Questions" class="image_section_search" src="/assets/Search-icon.gif" title="Lookup Questions">
</a>
Thanks!!
Just use the jQuery
.unwrap()function.The line you care about is:
$('#section').unwrap();Just put that in a place that gets called when you want to remove the
atag.Fiddle: http://jsfiddle.net/gromer/6YSQQ/