aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2009-10-17 01:27:02 +0000
committerRichard Worth <rdworth@gmail.com>2009-10-17 01:27:02 +0000
commit7f3e20b2b2151041b5f0edc1a8efcbb2500f1fb8 (patch)
tree7f64fdf40be381104489215113fde6d2643cafd0 /ui
parent59c77d3b7e482991f7d3016875c4d1ba734777da (diff)
downloadjquery-ui-7f3e20b2b2151041b5f0edc1a8efcbb2500f1fb8.tar.gz
jquery-ui-7f3e20b2b2151041b5f0edc1a8efcbb2500f1fb8.zip
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.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.tabs.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index 172177cf2..18515fdf7 100644
--- a/ui/jquery.ui.tabs.js
+++ b/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) {