Using an if statement to match element clicked
<p>Using Jquery, how can I say(this is within a click() function):</p>

<pre><code>if(element clicked has an href == 'the href location'){

};
</code></pre>

<p>I was using something like this: </p>

<pre><code>if ($(this).attr('href') == 'image.png') {
//Do Stuff
};
</code></pre>

<p>This wasn't working, because I found out that $(this) was referring to the window. Furthermore, I don't know how to make the use of $(this) specific to something.</p>

<p>Any help would be appreciated. </p>
