What’s wrong with the below?
<html>
<body>
<div id='test'>28</div>
</body>
</html>
<script>
$(document).ready(function (){
if ($('#test').text().length() > 0) // error here?
alert("test");
});
I get a JavaScript error in I.E 6 saying function expected on the line marked error.
Length in javascript is not a function. its a property so instead of length() use length