I want to get nodeType and then compare it to where it is text node or element node.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script type="text/javascript">
$(function(){
var mm= $('.jj')
alert(mm.nodeValue)
})
</script>
</head>
<body>
<div class="jj">value</div>
</body>
try to access to those properties with
var mm = $('.jj').get(0);
alert(mm.nodeValue);
alert(mm.nodeType)
If 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