Skip to content

Commit 670c7dc

Browse files
committed
return false in handler prevents binding other click handlers
ran into this issue at work where we were trying to add additional events when tabs are clicked. the return false prevents those events from firing though.
1 parent 3ccc9f3 commit 670c7dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

js/jquery.smartTab.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@
6565

6666
function setEvents(){
6767
$(tabs).bind("click", function(e){
68-
if(tabs.index(this)==obj.data('curTabIdx')) return false;
69-
showTab(tabs.index(this));
70-
if(options.autoProgress) restartAutoProgress();
71-
return false;
68+
if(tabs.index(this)!=obj.data('curTabIdx')) {
69+
showTab(tabs.index(this));
70+
if(options.autoProgress) restartAutoProgress();
71+
}
7272
});
7373

7474
if(options.keyNavigation){

0 commit comments

Comments
 (0)