jquery remove tags keep content
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery Remove Wrapper Element</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").find("a.link").contents().unwrap();
});
});
</script>
</head>
<body>
<p>If you click the following button it will remove the anchor tag from <a href="#" class="link">this link</a> but keep the text content intact.</p>
<button type="button">Remove Link</button>
</body>
</html>
Also in JavaScript:
- node js find directory change directory
- active-class router-link
- onswitch from tab do something jquery
- check when input number value goes up or down
- app.js:38650 [Vue warn]: Failed to mount component: template or render function not defined
- instantiate js
- FizzBuzz
- javascript modal show
- .gitignore nodejs
- js loop trough map
- mixin in styled components
- slider js
- javascript get elements in both arrays
- str_word_count php js
- leaflet draw save event
- Javascript get sum of array values
- jquery redirect
- mapstatetoprops redux
- jstl spring taglib
- professional react projects
- Javascript check if undefined
- make query param optional node
- angular datatable reload with pagination
- computed setter