diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-04-05 21:39:02 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-04-05 21:39:02 -0400 |
commit | bc6a28ee03ed2eb391ec839a05ced94a84debefe (patch) | |
tree | fb5f696d1eed14996fa1d756ac04dfd816e19f55 /ui/jquery.ui.tabs.js | |
parent | 168ab6656d71e6c21ffef7f058b5afa2893007a6 (diff) | |
download | jquery-ui-bc6a28ee03ed2eb391ec839a05ced94a84debefe.tar.gz jquery-ui-bc6a28ee03ed2eb391ec839a05ced94a84debefe.zip |
Tabs: Cleaned up _tabId() implementation.
Diffstat (limited to 'ui/jquery.ui.tabs.js')
-rwxr-xr-x | ui/jquery.ui.tabs.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index c16fe94c0..646854f49 100755 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -128,8 +128,7 @@ $.widget( "ui.tabs", { }, _tabId: function( a ) { - return ( $( a ).attr( "aria-controls" ) || "" ) || - "ui-tabs-" + getNextTabId(); + return $( a ).attr( "aria-controls" ) || "ui-tabs-" + getNextTabId(); }, _sanitizeSelector: function( hash ) { @@ -860,7 +859,7 @@ if ( $.uiBackCompat !== false ) { }; }( jQuery, jQuery.ui.tabs.prototype ) ); - // _tabId method + // panel ids (idPrefix option + title attribute) (function( $, prototype ) { $.extend( prototype.options, { idPrefix: "ui-tabs-" @@ -868,13 +867,13 @@ if ( $.uiBackCompat !== false ) { var _tabId = prototype._tabId; prototype._tabId = function( a ) { - return ( $( a ).attr( "aria-controls" ) || "" ) || + return $( a ).attr( "aria-controls" ) || a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF-]/g, "" ) || this.options.idPrefix + getNextTabId(); }; }( jQuery, jQuery.ui.tabs.prototype ) ); - // _tabId method + // _createPanel method (function( $, prototype ) { $.extend( prototype.options, { panelTemplate: "<div></div>" |