r3367 committed - Tabs: fixed to use a counter for unique ids instead of relying on $.da...
Revision: 3367
Author: rdworth
Date: Fri Oct 16 18:27:02 2009
Log: Tabs: fixed to use a counter for unique ids instead of relying on
$.data(elem), which in 1.4 won't return an id. Thanks Mark Gibson.
http://code.google.com/p/jquery-ui/source/detail?r=3367
Modified:
/trunk/ui/jquery.ui.tabs.js
=======================================
--- /trunk/ui/jquery.ui.tabs.js Thu Sep 17 03:39:12 2009
+++ /trunk/ui/jquery.ui.tabs.js Fri Oct 16 18:27:02 2009
@@ -12,6 +12,8 @@
*/
(function($) {
+var tabId = 0;
+
$.widget("ui.tabs", {
_init: function() {
@@ -39,7 +41,7 @@
_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) {