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

Slinky with Bootstrap #44

Open
nguyenhuuthuat09 opened this issue Jul 1, 2020 · 1 comment
Open

Slinky with Bootstrap #44

nguyenhuuthuat09 opened this issue Jul 1, 2020 · 1 comment

Comments

@nguyenhuuthuat09
Copy link

nguyenhuuthuat09 commented Jul 1, 2020

Hi, thank you for your great work. I really love your Slinky. And I am trying to combine it with Bootstrap 4. I want when user click on Dropdown button, it will show Slinky menu instead of Bootstrap's normal dropdown menu.

I tried to do it here: https://codepen.io/nht910/pen/wvMPOOy . But it doesn't seem to work.

And I am just a newbie so I have no idea to fix it. Can you please help me to fix it?

Thank you so so much.

P/s: sorry for my bad English.

@elwebdeveloper
Copy link

Hum... A quick response: You need to use BS dropdown methods for that.
$('.dropdown-menu').on('show.bs.dropdown', function () {
window.slinky = $('#menu').slinky();
})
Also, might want to destroy it once the dropdown is closed
$('#myDropdown').on('show.bs.dropdown', function () {
window.slinky.destroy();
})

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

No branches or pull requests

2 participants