slinky icon indicating copy to clipboard operation
slinky copied to clipboard

Slinky with Bootstrap

Open nguyenhuuthuat09 opened this issue 4 years ago • 1 comments

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.

nguyenhuuthuat09 avatar Jul 01 '20 21:07 nguyenhuuthuat09

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(); })

elwebdeveloper avatar Sep 11 '20 20:09 elwebdeveloper