hasClass is not a function
<p>I was wondering if anyone could help out. The problem is quite simple though but I can't get it. I keep on getting this error message saying,</p>

<blockquote>
  <p>TypeError : $(...)hasClass is not function.</p>
</blockquote>

<p>Can anyone help out here?:</p>

<pre><code>$(function fade(){
    $('#contentWrap &gt; div').hide();
    $('#contentWrap &gt; div:first').show();
    $('#container-5 a:first').addClass('active');

    $('#container-5 ul li a').click(function fade() {
        if ($(this).hasClass('active') == true){
            return false;
        }else{
            $('a.active').removeClass('active');
            $(this).addClass('active');

            $('#contentWrap &gt; div').fadeOut(100);
            var contentToLoad = $(this).attr('href');
            $(contentToLoad).fadeIn(5000);

            return false;
        }
    });
});
</code></pre>
