aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/unit/tooltip/tooltip_options.js9
-rw-r--r--tests/visual/tooltip/tooltip.html15
2 files changed, 15 insertions, 9 deletions
diff --git a/tests/unit/tooltip/tooltip_options.js b/tests/unit/tooltip/tooltip_options.js
index 41873ab5b..99d582489 100644
--- a/tests/unit/tooltip/tooltip_options.js
+++ b/tests/unit/tooltip/tooltip_options.js
@@ -23,6 +23,15 @@ test("content: return string", function() {
same( $(".ui-tooltip").text(), "customstring" );
});
+test("content: return jQuery", function() {
+ $("#tooltipped1").tooltip({
+ content: function() {
+ return $("<div></div>").html("cu<b>s</b>tomstring");
+ }
+ }).tooltip("open");
+ same( $(".ui-tooltip").text(), "customstring" );
+});
+
test("content: callback string", function() {
stop();
$("#tooltipped1").tooltip({
diff --git a/tests/visual/tooltip/tooltip.html b/tests/visual/tooltip/tooltip.html
index 7b931b155..1e2832e34 100644
--- a/tests/visual/tooltip/tooltip.html
+++ b/tests/visual/tooltip/tooltip.html
@@ -24,12 +24,10 @@
$("#context1 a, form input, #childish").tooltip();
// custom class, replaces ui-widget-content
- $("#context2 [title]").tooltip({
- tooltipClass: "ui-widget-header"
- });
- $("#right1").tooltip({
- tooltipClass: "ui-state-error"
- });
+ $("#context2 [title]").tooltip().each(function() {
+ $(this).tooltip("widget").addClass("ui-widget-header");
+ })
+ $("#right1").tooltip().tooltip("widget").addClass("ui-state-error");
// synchronous content
$("#see-footnote").tooltip({
@@ -69,9 +67,8 @@
my: "center top",
at: "center bottom",
offset: "0 10"
- },
- tooltipClass: "ui-state-highlight"
- });
+ }
+ }).tooltip("widget").addClass("ui-state-highlight");
var positionOnTop = {
position: {