how to write basic jquery if statement based on url
<p>I don't know why this doesnt work. Although im sure its something to do with the way im handling the url in the if statement. My Jquery / javascript knowledge if basic.</p>

<pre><code>var url = $(location).attr('href');

if (url == 'http://www.website.com/test/index.html')
{
  $('#HomeButton').bind('click', HomeButton);
} 

function HomeButton(e) {
e.preventDefault();

doSomething....

};
</code></pre>
