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
Many things are wrong:
script
tagDOCTYPE
head
:-)length
is a property not a functionIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With