Skip to content
Permalink
Browse files

Tabs: fixed to use a counter for unique ids instead of relying on $.d…

…ata(elem), which in 1.4 won't return an id. Thanks Mark Gibson.
  • Loading branch information
rdworth committed Oct 17, 2009
1 parent 59c77d3 commit 7f3e20b2b2151041b5f0edc1a8efcbb2500f1fb8
Showing with 3 additions and 1 deletion.
  1. +3 −1 ui/jquery.ui.tabs.js
@@ -12,6 +12,8 @@
*/
(function($) {

var tabId = 0;

$.widget("ui.tabs", {

_init: function() {
@@ -39,7 +41,7 @@ $.widget("ui.tabs", {

_tabId: function(a) {
return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') ||
this.options.idPrefix + $.data(a);
this.options.idPrefix + (++tabId);
},

_sanitizeSelector: function(hash) {

0 comments on commit 7f3e20b

Please sign in to comment.
You can’t perform that action at this time.