jquerytools/jquerytools — Issue #539: Server action is triggered when switching tabs in slideshow
Author: tmoskun
Created: 2011-10-19 01:01:54+00:00
State: open

I have a Ruby on Rails application using this plugin. When I switch tabs (click on the "prev/next" arrows, click on the slidetabs, or play the show, doesn't matter), it calls the server. In order for the application not to call the server, the javascript code should return false.

I coudn't change it in my minified version, but I looked through the source code, and tabs/tabs.js has the following lines (265-270)

// setup click actions for each tab
tabs.each(function(i) {
$(this).bind(conf.event, function(e) {
self.click(i, e);
return e.preventDefault();
});
});

Would "return e.preventDefault();" always be true? Should it be no "return" word there?