Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

💀 Deprecated ⚠️ jQuery plugin for drop-in fix binded events problem caused by Turbolinks

License

Notifications You must be signed in to change notification settings

kossnocorp/jquery.turbolinks

Repository files navigation

jQuery Turbolinks

Do you like Turbolinks? It's easy and fast way to improve user experience of surfing on your website.

But if you have a large codebase with lots of $(el).bind(...) Turbolinks will surprise you. Most part of your JavaScripts will stop working in usual way. It's because the nodes on which you bind events no longer exist.

I wrote jquery.turbolinks to solve this problem in my project. It's easy to use: just require it after jquery.js and tubrolinks.js, but before other scripts.

Sponsored by Evil Martians.

Usage

Gemfile:

gem 'jquery-turbolinks'

JavaScript manifest file:

//= require jquery.turbolinks

And it just works!

$.setReadyEvent

By default ready function is binded to page:load event.

If you want to change it use $.setReadyEvent function:

$.setReadyEvent('page:change');

Changelog

This project uses Semantic Versioning for release numbering.

0.2.0 (October 10, 2012)

  • Change event: page:change -> page:load (kudos to @davydotcom);
  • added ability to change ready event via $.setReadyEvent

0.1.0 (October 3, 2012)

  • First, initial release

Contributors

Idea and code by @kossnocorp.

About

💀 Deprecated ⚠️ jQuery plugin for drop-in fix binded events problem caused by Turbolinks

Resources

License

Stars

Watchers

Forks

Packages

No packages published