jquery if statement and hasClass?
<p>I am using wordpress and a plugin called advanced ajax page loader.
<a href="http://wordpress.org/extend/plugins/advanced-ajax-page-loader/" rel="nofollow">http://wordpress.org/extend/plugins/advanced-ajax-page-loader/</a></p>

<p>I am somewhat familiar with php, javascript and jquery, but not an expert by any means. I have the following block of code that excludes certain pages from loading in ajax and it works great.</p>

<pre><code>jQuery(scope + "a").click(function(event){
    //if its not an admin url, or doesnt contain #
    if (  this.href.indexOf(AAPLhome) &gt;= 0 &amp;&amp; this.href.indexOf('/wp-') &lt; 0 &amp;&amp; this.href.indexOf('#') &lt; 0 &amp;&amp; this.href.indexOf('/search') &lt; 0 &amp;&amp; this.href.indexOf('/2013') &lt; 0 &amp;&amp; this.href.indexOf('/2012') &lt; 0 &amp;&amp; this.href.indexOf('/2011') &lt; 0 &amp;&amp; this.href.indexOf('/feed') &lt; 0 &amp;&amp; this.href.indexOf('/portfolio') &lt; 0 &amp;&amp; this.href.indexOf('/store') &lt; 0 ){
        // stop default behaviour
        event.preventDefault();
});
</code></pre>

<p>As you can see I am excluding pages with certain strings in their url. </p>

<p>However I need to target the homepage link and by inserting the home url this way, all pages contain the home url so they are all excluded. I want to be able to insert a hasClass statement in this block of code so I can exclude a link that has a class of 'homelink'.</p>

<p>This following gave me an error of this.hasClass is not a function.</p>

<pre><code>this.hasClass('homelink')
</code></pre>

<p>So I must be doing something wrong but I'm darned if I know what.</p>

<p>I have tried looking at these links but didn't get much out of it.</p>

<p><a href="http://stackoverflow.com/questions/6051373/jquery-hasclass-if-statement">Jquery hasClass + If Statement</a></p>

<p><a href="http://stackoverflow.com/questions/5345374/jquery-hasclass-in-if-statement-not-playing-nicely">Jquery — hasClass in if statement not playing nicely</a></p>

<p><a href="http://api.jquery.com/hasClass/" rel="nofollow">http://api.jquery.com/hasClass/</a></p>
