I guess I'm looking for an opposite to $(this).
If I have 3 elements with the same class how can I select only the elements I haven't clicked. EG:
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
And I click the middle div, how do I only implement effects on the first and last element?
You could use not()
:
$('div.test').click(function(){
var notClicked = $('.test').not(this);
});