Im using the following click function on an element:
$('#extras').toggle(function() {
$('div#extras').show();
$('div#extras').stop().fadeTo('fast', 1);
},
function() {
$('div#extras').stop().fadeTo('fast', 0, function() {
$(this).hide();
} );
}
);
extras is a div, with many children in it. Some are buttons. Now every time I click one of the buttons, it makes the parent div along with the children disapear.
How do I make it so the click function only fires if the parent is clicked, and not all of its children?
Thanks :)