1

Holder.js doesn't work with turbolinks.

I'm getting empty images.

It works when i press Ctrl+R.

How to get them work together?

Anton
  • 905
  • 8
  • 18

2 Answers2

1

Use this script to run holder.js between requests:

$(document).bind 'page:change', ->
  Holder.run()
Anton
  • 905
  • 8
  • 18
0

For Rails 5 I had to use this:

document.addEventListener('turbolinks:load', function() {
    Holder.run()
});

See https://stackoverflow.com/a/18770589/1845011 and https://github.com/turbolinks/turbolinks#installing-javascript-behavior

Pluto1010
  • 103
  • 8