-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to fire multiple Pushy sections? #45
Comments
It's not possible at the moment. Pushy was developed with only one menu in mind. You are always welcome to fork this repo and add this feature yourself. |
I was able to get this working with a few tweaks. I consolidated some code into a Then, to set things up, make Pushy accept parameters for a Pushy element and a trigger element. You can have multiple triggers on a page, each toggling a Pushy element, while only one Pushy menu is ever open at a time. Here's a simple example with one button triggering one Pushy menu, and another button triggering a separate Pushy menu: http://jsfiddle.net/3otdLcLL/ Diff dump for the lazy:
Pull request to come soon™ |
Actually, pull request not to come soon; I am not sure of the recommended way to invoke Pushy with specific elements. (This just came out of me sprinting towards getting it working for a push.) If we went that route (function arguments), we could just provide defaults for I think the "right" way would be to do something like If we start supporting selectors for For example:
and avoid another selection. |
I use @rwong48 method. |
Seems to work for the method of both same side, but if one tries to have a Any idea there? @rwong48 @christophery ? |
Love the plugin and using it on a new site for the nav but was wondering if there's a way to add another off canvas element for a contact form and have that slide in on click separate from the navigation?
The text was updated successfully, but these errors were encountered: