-
Notifications
You must be signed in to change notification settings - Fork 33
The slick carousel breaks second time loading page. #16
Comments
All in all, this issue should not be reported here, because this is merely a gem that hooks slick itself https://github.com/kenwheeler/slick/ Still, judging by your description it seems you are using turbolinks. Is that correct? If yes, use https://rubygems.org/gems/jquery-turbolinks as well to restore original jQuery events. |
Closed due to inactivity. If the suggested solution does not help, feel free to reopen the issue. |
Unfortunately jquery.turbolinks doesn't work with turbolinks 5 (yet) New Turbolinks handles things better, but I still had issues with slick not initialising properly after a turbolinks:load event. However upgrading to slick 1.6.0 seemed to resolve it |
Well, that's too bad, but please understand that this is simply a wrapper for the Slick library, so it's not the best place to report such issues. What I recommend doing is searching for similar issues on StackOverflow or asking a question... I will try and and see if I can update the demo app https://github.com/bodrovis/jquery-slick-rails-demo and introduce turbolinks there to reproduce the issue. |
@raldred All in all, I was able to get it working with Turbolinks https://github.com/bodrovis/jquery-slick-rails-demo/blob/master/app/assets/javascripts/initialize.coffee#L1 You may use that demo app a reference. |
I totally understand this gem is purely a wrapper for asset pipeline but I On Thu, 26 May 2016, 18:43 Ilya Bodrov-Krukowski, [email protected]
|
@raldred Okay, great. No more issues with turbolinks for now? |
I am having trouble with turbolinks 5 still. |
@chevinbrown Did you try to use this https://github.com/bodrovis/jquery-slick-rails-demo app as a reference? What issue are you having. P.S. And once again - this is a wrapper around Slick library, so I am not in charge of the JS code. |
No, I solved it...I needed to wrap my slide images in an empty div...I'm not sure that's in the docs anywhere, but I'll follow up with the author. @bodrovis, thanks for the quick reply. |
The first time I visit a page with the slick carousel on it it operates normally. If I route to another page and then back to the carousel the images will all stack on top of each other and the carousel will be broken. The site is also using bootstrap4 so I don't know if they are clashing.
The text was updated successfully, but these errors were encountered: