jQuery has an unwrap()
method which removes the parent node and leaves the matched element in place:
$(".gallery").contents().filter(".thumbnail").unwrap();
// or (faster)
$(".gallery .thumbnail").unwrap();
- http://api.jquery.com/unwrap/
jQuery has an unwrap()
method which removes the parent node and leaves the matched element in place:
$(".gallery").contents().filter(".thumbnail").unwrap();
// or (faster)
$(".gallery .thumbnail").unwrap();