here is code:
<script type="text/javascript">
function doit(){
$('table td').each(function () {
if ($(this).text().trim() != '')
$(this).css("border", "1px groove white");
});
}
doit();
</script>
this works in chrome and firefox.
BUT in IE 6 and 8 i have ‘Object doesn’t support this property or method’
The issue isn’t with
.css(), but with.trim(). IE doesn’t have a native.trim()method for String.You can use jQuery’s
$.trim()instead.So the
if()statement would be: