Use pushStack in tooltip's widget method. See #5732

This commit is contained in:
jzaefferer 2010-07-30 14:30:43 +02:00
parent 52c31650b0
commit 96977edecc
2 changed files with 8 additions and 1 deletions

View File

@ -20,4 +20,11 @@ test("open", function() {
$(":ui-tooltip").tooltip("destroy"); $(":ui-tooltip").tooltip("destroy");
}); });
test("widget", function() {
var tooltip = $("#tooltipped1").tooltip();
same(tooltip.tooltip("widget")[0], $(".ui-tooltip")[0]);
same(tooltip.tooltip("widget").end()[0], tooltip[0]);
});
})(jQuery); })(jQuery);

View File

@ -70,7 +70,7 @@ $.widget("ui.tooltip", {
}, },
widget: function() { widget: function() {
return this.tooltip; return this.element.pushStack(this.tooltip.get());
}, },
open: function(event) { open: function(event) {