How do I determinate if one of the buttons have the class "selected"?
<a id="foo">Foo</a>
<div id="div">
<input type="button" />
<input type="button" class="selected" />
<input type="button" />
</div>
I wrap foo into a jQuery object. Call next() to get to the div. How do I do the rest?
function fooClickHandler(foo) {
var $self = $(foo);
var selectedExists = $self.next().children('input .selected');
};