iamphill / Bootstrap-Offcanvas

:zap: Offcanvas menu built with Bootstrap
MIT License
366 stars 111 forks source link

Incompatible with Turbolinks #73

Closed matthewscalf closed 6 years ago

matthewscalf commented 7 years ago

How can re-instantiate the off canvas menu with a turbo link load? Basically the body is replaced with ajax content, so the scripts are not called again, but I can fire a function on turbo link load, so I could re-setup the object but I cannot see how.

matthewscalf commented 7 years ago

I figured out a workaround, but feels kind of hacky. Let me know if there is a better way.

iamphill commented 7 years ago

@matthewscalf hey! Sorry the slow reply to this. You could just init the offcanvas script in the Turbolinks ready event.

iamphill commented 7 years ago

Ah to do that we probably need #66 😞