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.

This commit is contained in:
Richard Worth 2009-10-17 01:27:02 +00:00
parent 59c77d3b7e
commit 7f3e20b2b2

View File

@ -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) {