Menu icon Foundation
ZF6.2 How to get Sticky to work with turbolinks?

Hi All,

I've got a sticky top-bar which doesn't work with turbolinks.

When a page is fully refreshed top-bar is sticky but then when go to another page the top-bar is no longer sticky!

 

I'm using rails 4.2.4 and Foundation 6.2.0.1 via the gem.

How do I get sticky to work with turbolinks?

zf6zf6.2stickytop-barrailsrails4turbolinks

Hi All,

I've got a sticky top-bar which doesn't work with turbolinks.

When a page is fully refreshed top-bar is sticky but then when go to another page the top-bar is no longer sticky!

 

I'm using rails 4.2.4 and Foundation 6.2.0.1 via the gem.

How do I get sticky to work with turbolinks?

Alex Khaldeev over 3 years ago

Hi,

This is pretty workaround but it works for me.

 

$(function() {

 $(document).foundation();

 // FIX.

 $(window).trigger('load.zf.sticky'); 

});