Popup: modified trigger option to support multiple elements. #582

Closed
wants to merge 2 commits into from

4 participants

@clarkbox
jQuery Foundation member

this replaces #578
Also adding this feature to the demo, and streamlining the JS in the demo to be more concise and clear.

@jzaefferer jzaefferer commented on the diff Feb 22, 2012
demos/popup/popup-menu-table.html
@@ -19,9 +19,15 @@
$(this).popup("close");
}
};
-
- $(".demo td:has(.menubar)").clone().appendTo(".demo tbody tr:not(:first)");
- $("table .menubar > ul").menu(selected).popup().prev().button();
+
+ $(".myMenu").menu(selected).popup({ trigger: $(".myButtons").button() });
+
+ $('#openButton').on('click', function(event){
+ $(".myMenu").popup('open');
+ event.preventDefault();
+ event.stopPropagation();
@jzaefferer
jQuery Foundation member

Despite these calls, clicking #openButton while the popup is still open causes it to open and close immediately. In other words, click on the first button to open it, then click on this button, and it'll go through to show and hide animations and end up not visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jzaefferer
jQuery Foundation member

Sorry it took so long to review this. Could you look into the reopening-issue? Once thats settled, we can land this.

@scottgonzalez
jQuery Foundation member

Is this still relevant?

@mikesherov
jQuery Foundation member

@clarkbox, I'm going to close this pull for now. It needs unit tests and has a couple of bugs to work out. If you're still interested in pursuing this, please feel free to open a new pull that addresses the issues @jzaefferer pointed out and write some tests. Thanks again man!

@mikesherov mikesherov closed this Nov 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment