COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Business Insight / Cognos Workspace => Topic started by: rcoon on 22 Feb 2011 05:36:37 PM

Title: jQuery positions
Post by: rcoon on 22 Feb 2011 05:36:37 PM
I have used jQuery to create some rich tooltips (displays a chart in the tooltip when you hover over an item in a list). This works fine when you run the report stand-alone. But when you include the report in a Business Insight project (dashboard), the positioning of this tooltip is way off.

In short, tooltip positioning will be altered by repositioning the report container within the dashboard. If I happen to place the report in the upper left corner of the dashboard, I get the positioning I expect. The further I move from that location, the further off the tooltip position becomes. This makes me think that when I ask for the position of an element, I am getting coordinates that are absolute with respect to the entire dashboard, but then when I set the position for a new element, it is setting it in coordinates that are local just to this report.

The positioning code for the tooltip to a 'usage' div is as follows:
var o=  $(".usage").offset()
$(".usage").tooltip({ offset: [o.left,o.top]  });


Any advice on how to get accurate positioning that is not affected by the location within the dashboard?

Thanks,
rob
Title: Re: jQuery positions
Post by: rcoon on 23 Feb 2011 05:19:45 PM
Please ignore my previous question. I believe I was running into a limitation with the particular jQuery plugin I used. I switched to a the ClueTip plugin for tooltip support, and positioning seems to be all good now!