Carlos Carlos - 1 year ago 123
jQuery Question

How to get nodeType using jquery

I want to get nodeType and then compare it to where it is text node or element node.

<html xmlns="">
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script type="text/javascript">
var mm= $('.jj')
<div class="jj">value</div>

Answer Source

try to access to those properties with

var mm = $('.jj').get(0);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download