Assume I have the follwing simplyfied HTML code:
<td> </td>
I want to get rid of it and code therefore:
$("td").filter( function(){ return $(this).text().match(/^\s*$/) }).remove();
This works in general but unfortunately also for situation where there is no text but images like in:
<td >
<img src="images/_banner.jpg" alt="myimage " >
How can I modify my jquery statement mentioned above so that the <td>...</td> is kept when an image is inside?
Peter