Argument not getting passed into function
<p>I am trying to simply pass a variable from a click event to an outside function. I keep getting my console.log string when testing for undefined.</p>

<p>Here is my click event.</p>

<pre><code>        $("#previous, #next").click(function() {
        if ((this).id == 'next') {
            slideID++
        } else {
            slideID--
        }
        clearInterval($('#slides').data('interval'));
        $("ul.pagination li").removeClass("current");

        portfolioSwitch(slideID);
    });
</code></pre>

<p>I call the portfolioSwitch function with the argument of slideID. I have tested with my console to see if the slideID exists. It comes back with the id I want.</p>

<p>On my function I have this code.</p>

<pre><code>if (portfolioSwitch.slideID === undefined) {
        console.log('Its undefined!');
}
</code></pre>

<p>It comes back as undefined still. So I did a console.log on the actual argument from the function.</p>

<pre><code>console.log(portfolioSwitch.slideID);
</code></pre>

<p>It still is undefined. Why isn't it being passed?</p>
