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 a
tag.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.