Skip to content
Permalink
Browse files

Tooltip: Removing tooltipClass option; use .tooltip("widget").addClas…

…s("whatever") instead
  • Loading branch information...
jzaefferer committed Oct 26, 2010
1 parent 61b4b3e commit 8b4245ac7e8c746af97059ed3ef1c886bccdb903
Showing with 1 addition and 17 deletions.
  1. +0 −1 tests/unit/tooltip/tooltip_defaults.js
  2. +0 −13 tests/unit/tooltip/tooltip_options.js
  3. +1 −3 ui/jquery.ui.tooltip.js
@@ -5,7 +5,6 @@
var tooltip_defaults = {
disabled: false,
content: $.ui.tooltip.prototype.options.content,
tooltipClass: "ui-widget-content",
position: {
my: "left center",
at: "right center",
@@ -37,17 +37,4 @@ test("content: callback string", function() {

});

test("tooltipClass, default", function() {
$("#tooltipped1").tooltip().tooltip("open");
same( $(".ui-tooltip").attr("class"), "ui-tooltip ui-widget ui-corner-all ui-widget-content");
$(":ui-tooltip").tooltip("destroy");
});
test("tooltipClass, custom", function() {
$("#tooltipped1").tooltip({
tooltipClass: "pretty fancy"
}).tooltip("open");
same( $(".ui-tooltip").attr("class"), "ui-tooltip ui-widget ui-corner-all pretty fancy");
$(":ui-tooltip").tooltip("destroy");
});

})(jQuery);
@@ -23,7 +23,6 @@ var increments = 0;

$.widget("ui.tooltip", {
options: {
tooltipClass: "ui-widget-content",
content: function() {
return $(this).attr("title");
},
@@ -39,8 +38,7 @@ $.widget("ui.tooltip", {
.attr("id", "ui-tooltip-" + increments++)
.attr("role", "tooltip")
.attr("aria-hidden", "true")
.addClass("ui-tooltip ui-widget ui-corner-all")
.addClass(this.options.tooltipClass)
.addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content")
.appendTo(document.body)
.hide();
this.tooltipContent = $("<div></div>")

0 comments on commit 8b4245a

Please sign in to comment.
You can’t perform that action at this time.