Help needed in using hasClass() to check <div> class in document
<p>I a trying to check for DIV class in my document.<br>
But it is not working for me,Please help me..  Below is my code  </p>

<pre><code>$(document).ready(function()
{
var x=$(this).hasClass('global');
alert(x);
});
</code></pre>

<p>And even i have tried below code but still same result..  </p>

<pre><code>  $(document).ready(function()
  {
   var x=$('#global').length;
   alert(x);
  });
</code></pre>

<p>It is always showing 0..... :-(</p>
