Skip to content

Instantly share code, notes, and snippets.

@jhummel
Created November 4, 2011 00:09
Show Gist options
  • Save jhummel/1338318 to your computer and use it in GitHub Desktop.
Save jhummel/1338318 to your computer and use it in GitHub Desktop.
Make ujs-jquery for rails work with Zepto
// Fix to make zepto work with ujs-jquery
$.fn.ajaxSend = function(callback) {
return this.each(function(){
$(this).on('ajaxBeforeSend', callback);
});
};
var jQuery = $;
@lanrion
Copy link

lanrion commented May 24, 2014

Thanks for you tips, but I still miss the exception:

Uncaught TypeError: Object function (selector, context){
    return zepto.init(selector, context)
  } has no method 'ajaxPrefilter' 

Any suggestions ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment