Tabs broken in jQuery 1.4pre due to changes in $.data(elem)

Tabs broken in jQuery 1.4pre due to changes in $.data(elem)


Hi guys,
Are you aware that $.data(elem) is changing in jQuery 1.4?
It will no longer return an id. So here's a patch to fix it's usage in tabs.
- Mark Gibson
Index: ui/jquery.ui.tabs.js
===================================================================
--- ui/jquery.ui.tabs.js    (revision 3364)
+++ ui/jquery.ui.tabs.js    (working copy)
@@ -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) {