Skip to content
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

Allow Multiple Pushy Menus with Different Buttons #141

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Oxibug
Copy link

@Oxibug Oxibug commented Jun 19, 2022

We've made some changes to enable using multiple buttons to trigger multiple different menus.

Added Classes:

wrp-pushy-trigger: to wrap the [menu-btn] inside it and to define the new data attributes

Added Data Attributes:

data-pushy-target: define the target menu unique class.
data-pushy-body-class: add some unique classes to the body selector.

Example:

<nav class="pushy pushy-left pushy-for-button-one">
    <div class="pushy-content">
    .....
    </div>
</nav>

<nav class="pushy pushy-right pushy-for-button-two">
    <div class="pushy-content">
    .....
    </div>
</nav>

<div class="wrp-pushy-trigger" data-pushy-target=".pushy-for-button-one" data-pushy-body-class="pushy-sidemenu-one another-class-one">
    <button class="menu-btn">Menu 1</button>
</div>

<div class="wrp-pushy-trigger" data-pushy-target=".pushy-for-button-two" data-pushy-body-class="pushy-sidemenu-two another-class-two">
    <button href="#" class="menu-btn">Menu 2</button>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant