turbolinks / turbolinks-classic

Classic version of Turbolinks. Now deprecated in favor of Turbolinks 5.
MIT License
3.54k stars 431 forks source link

page:partial-load without jQuery #595

Closed cchko closed 9 years ago

cchko commented 9 years ago

Is there a way to bind to the page:partial-load event without jQuery? Couldn't find documentation for this.

tortuetorche commented 9 years ago

Hi @cchko,

From the CoffeeScript turbolinks_replace_test.coffee file, I guess:

 document.addEventListener 'page:partial-load', (event) ->
   # your code here

Or in Javascript:

document.addEventListener('page:partial-load', function(event) {
  // your code here
});

Have a good day

Thibaut commented 9 years ago

:+1:

cchko commented 9 years ago

Thanks!