-2

When i made an exit button for a panel that goes full size when you click it, once the window "return to original size" animation is done. it does the "fullscreen the window" animation ? here is the JSFiddle link so you can look at it.

because for jsfiddle links you need a code section, here it is

http://jsfiddle.net/txpmrv47/

A. Wolff
  • 74,033
  • 9
  • 94
  • 155
duck
  • 1,674
  • 2
  • 16
  • 26

1 Answers1

1

Use:

$('#exit-button').click(function (event) {
    event.stopPropagation();

    // The rest of your code.
 });

Explanation:

You have a nested element, #exit-button, with a click event handler. It's parent also has a click event handler. Due to event bubbling, the parent click handler gets called when the child element is clicked.

Hopefully that helps.

Community
  • 1
  • 1
Trey Cordova
  • 124
  • 4
  • that worked ! thanks ever so much dude ! i've been going at this problem all day xD. cheers ! – duck May 15 '15 at 18:53