jQuery function parameters
<p>Ok, so basically I just want to make a simple function that will change the CSS value of a div that has been clicked. The selected div ($(this)) will be passed to the divClicked function. I could just call the CSS jQuery function here but i want to perform the implementation in another function.</p>

<pre><code>$('#container').children().click(function(){
    divClicked($(this));
});
</code></pre>

<p>but in the divClicked function when i go to run a jQuery function on the div variable it doesn't work... any idea what i'm doing wrong.</p>

<pre><code>function divClicked(selectedDiv)
{
    $(selectedDiv).css('background', 'red');
}
</code></pre>
