From 619ac1ee2dd8a3323bdaa6adabc685002991cff9 Mon Sep 17 00:00:00 2001 From: pete Date: Wed, 25 Jun 2008 18:42:38 +0000 Subject: widget gallery tooltip positioning and layer issue fixed git-svn-id: https://code.elgg.org/elgg/trunk@1135 36083f99-b078-4883-b0ff-0f9b5a30f544 --- javascript/initialise_elgg.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'javascript') diff --git a/javascript/initialise_elgg.js b/javascript/initialise_elgg.js index 171874963..e19515f18 100644 --- a/javascript/initialise_elgg.js +++ b/javascript/initialise_elgg.js @@ -211,12 +211,23 @@ function widget_moreinfo() { var widgetdescription = $("input[@name='description']", this.parentNode.parentNode.parentNode ).attr('value'); - $("body").append("

"+ widgetdescription +"
and there is room for a slightly
longer description spanning
several lines.

"); - - $("#widget_moreinfo") - .css("top",(e.pageY + 10) + "px") - .css("left",(e.pageX + 10) + "px") - .fadeIn("medium"); + $("body").append("

"+ widgetdescription +"

"); + + // alert('e.pageX = '+e.pageX); + + if (e.pageX < 900) { + $("#widget_moreinfo") + .css("top",(e.pageY + 10) + "px") + .css("left",(e.pageX + 10) + "px") + .fadeIn("medium"); + } + else { + $("#widget_moreinfo") + .css("top",(e.pageY + 10) + "px") + .css("left",(e.pageX - 210) + "px") + .fadeIn("medium"); + } + }, function() { $("#widget_moreinfo").remove(); -- cgit v1.2.3