[javascript]
$(‘p’).each(function() {
var $p = $(this),
txt = $p.html();
if (txt==’ ’) {
$p.remove();
}
});
$(‘p’)
.filter(function() {
return $.trim($(this).text()) === ”
})
.remove()
[/javascript]
[javascript]
$(‘p’).each(function() {
var $p = $(this),
txt = $p.html();
if (txt==’ ’) {
$p.remove();
}
});
$(‘p’)
.filter(function() {
return $.trim($(this).text()) === ”
})
.remove()
[/javascript]
© 2012 Best jQuery.