run jQuery function by inline onClick and use function variable/reference
<p>I am very new to this, but I wrote this and thought it would work first time, but I get an 'ReferenceError: Can't find variable: street' console error.</p>

<p>I get this error if I click on the 'Street' button.</p>

<p>It's quite basic but this is the first time I've made a function to use a var/ref from the onClick attribute.</p>

<p>Please see onClick markup...</p>

<pre><code>&lt;a href="#" title="View Supersport" onclick="bikeFilter(supersport)"&gt;Supersport&lt;/a&gt;

&lt;a href="#" title="View Street" onclick="bikeFilter(street)"&gt;Street&lt;/a&gt;

&lt;a href="#" title="View Cruiser" onclick="bikeFilter(cruiser)"&gt;Cruiser&lt;/a&gt;

&lt;a href="#" title="View Scooter" onclick="bikeFilter(scooter)"&gt;Scooter&lt;/a&gt;      


&lt;a href="#" title="Motocross" onclick="bikeFilter(motocross)"&gt;Motocross&lt;/a&gt;

&lt;a href="#" title="Enduro" onclick="bikeFilter(enduro)"&gt;Enduro&lt;/a&gt;

&lt;a href="#" title="Kids" onclick="bikeFilter(kids)"&gt;Kids&lt;/a&gt;
</code></pre>

<p>then please see my function, which gets the ref error above...</p>

<p><strong>Also please note I am trying to use the onClick var/ref within my function so I can target specific elements relative to the button being clicked.</strong></p>

<pre><code>bikeFilter = function (y) {

    $('.bike').fadeOut();

    scrollTo(186);

    $('.bike[data-group=' + y + ']').fadeIn();

    bikeSliderNav();

    bikeSlider();

    return false;

}
</code></pre>

<p><br /></p>

<p>Any expert advice would be really helpful.</p>

<p>Thanks in advance.</p>
