From f7d4507ebea6ad2915741fb112e7c9c430ccf76e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 28 Dec 2018 19:09:11 +0100 Subject: [PATCH] Keep sticky elements after AJAX requests Turbolinks doesn't get on well with Foundation's Sticky, and so we need to manually trigger the event on Turbolinks' `page:load`. --- app/assets/javascripts/foundation_extras.js.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/foundation_extras.js.coffee b/app/assets/javascripts/foundation_extras.js.coffee index cf1bcb768..720b62047 100644 --- a/app/assets/javascripts/foundation_extras.js.coffee +++ b/app/assets/javascripts/foundation_extras.js.coffee @@ -2,3 +2,4 @@ App.FoundationExtras = initialize: -> $(document).foundation() + $(window).trigger "load.zf.sticky"