aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMaxPower15 <max.schnur@gmail.com>2010-12-20 08:50:23 -0500
committerScott González <scott.gonzalez@gmail.com>2010-12-20 08:50:23 -0500
commite104f6cfa0324f9625c6258bb87f708d7c35d7bd (patch)
tree7dd3ca813be940ae163b94b29935efd1dc179edf /ui
parent956697bfca1b386ae20eb27ccfd8c1df3234f1f2 (diff)
downloadjquery-ui-e104f6cfa0324f9625c6258bb87f708d7c35d7bd.tar.gz
jquery-ui-e104f6cfa0324f9625c6258bb87f708d7c35d7bd.zip
Tabs: Use event.preventDefault() instead of return false. Fixes #6765 - Tabs: Use event.preventDefault() instead of returning false.
Diffstat (limited to 'ui')
-rwxr-xr-x[-rw-r--r--]ui/jquery.ui.tabs.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index 13e1c25c8..82da51d5b 100644..100755
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -330,7 +330,8 @@ $.widget( "ui.tabs", {
};
// attach tab event handler, unbind to avoid duplicates from former tabifying...
- this.anchors.bind( o.event + ".tabs", function() {
+ this.anchors.bind( o.event + ".tabs", function( event ) {
+ event.preventDefault();
var el = this,
$li = $(el).closest( "li" ),
$hide = self.panels.filter( ":not(.ui-tabs-hide)" ),
@@ -346,7 +347,7 @@ $.widget( "ui.tabs", {
self.panels.filter( ":animated" ).length ||
self._trigger( "select", null, self._ui( this, $show[ 0 ] ) ) === false ) {
this.blur();
- return false;
+ return;
}
o.selected = self.anchors.index( this );
@@ -367,7 +368,7 @@ $.widget( "ui.tabs", {
}).dequeue( "tabs" );
this.blur();
- return false;
+ return;
} else if ( !$hide.length ) {
if ( o.cookie ) {
self._cookie( o.selected, o.cookie );
@@ -381,7 +382,7 @@ $.widget( "ui.tabs", {
self.load( self.anchors.index( this ) );
this.blur();
- return false;
+ return;
}
}
@@ -415,8 +416,8 @@ $.widget( "ui.tabs", {
});
// disable click in any case
- this.anchors.bind( "click.tabs", function(){
- return false;
+ this.anchors.bind( "click.tabs", function( event ){
+ event.preventDefault();
});
},