Jak uzyskać typ węzła za pomocą jquery

Chcę pobrać typ węzła, a następnie porównać go z węzłem tekstowym lub węzłem elementu.

<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>

questionAnswers(5)

yourAnswerToTheQuestion