From 48a5977d3325869abd7b7ba835eb8ac331fd6eb5 Mon Sep 17 00:00:00 2001 From: jzaefferer Date: Tue, 26 Oct 2010 17:07:22 +0200 Subject: Tooltip: Implementing event delegation support. --- tests/visual/tooltip/tooltip.html | 45 ++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 20 deletions(-) (limited to 'tests/visual') diff --git a/tests/visual/tooltip/tooltip.html b/tests/visual/tooltip/tooltip.html index 1e2832e34..6d4e15c9e 100644 --- a/tests/visual/tooltip/tooltip.html +++ b/tests/visual/tooltip/tooltip.html @@ -21,16 +21,17 @@ function enable() { // default - $("#context1 a, form input, #childish").tooltip(); + $("#context1, form, #childish").tooltip(); // custom class, replaces ui-widget-content - $("#context2 [title]").tooltip().each(function() { + $("#context2").tooltip().each(function() { $(this).tooltip("widget").addClass("ui-widget-header"); }) $("#right1").tooltip().tooltip("widget").addClass("ui-state-error"); // synchronous content - $("#see-footnote").tooltip({ + $("#footnotes").tooltip({ + items: "[href^=#]", content: function() { return $($(this).attr("href")).html(); } @@ -70,25 +71,25 @@ } }).tooltip("widget").addClass("ui-state-highlight"); - var positionOnTop = { - position: { - my: "center bottom", - at: "center top", - offset: "0 -5" - } - }; - $("#button1").button().tooltip(positionOnTop); + $("#button1").button(); $("#button2").button({ icons: { primary: "ui-icon-wrench" } - }).tooltip(positionOnTop); + }); $("#button3, #button4").button({ icons: { primary: "ui-icon-wrench" }, text: false - }).tooltip(positionOnTop); + }); + $("#buttons").tooltip({ + position: { + my: "center bottom", + at: "center top", + offset: "0 -5" + } + }); } enable(); @@ -121,8 +122,9 @@ collision detection should kick in around here -
- I'm a link to a footnote. +
@@ -159,12 +161,15 @@
- - - - +
+ + + + +
-
This is the footnote, including other elements
+
This is the footnote, including other elements
+
This is the other footnote, including other elements
-- cgit v1.2.3