Skip to content

Commit 78ca61e

Browse files
committed
Merge pull request #2 from jblotus/patch-1
return false in handler prevents binding other click handlers
2 parents 3ccc9f3 + 3c7b7b4 commit 78ca61e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

js/jquery.smartTab.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,11 @@
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+
e.preventDefault();
69+
if(tabs.index(this)!=obj.data('curTabIdx')) {
70+
showTab(tabs.index(this));
71+
if(options.autoProgress) restartAutoProgress();
72+
}
7273
});
7374

7475
if(options.keyNavigation){

0 commit comments

Comments
 (0)