show code
<div><div></div></div>
<script>
alert($("div").length);
</script>