Search code examples
iframemootoolsabsolutetooltip

Mootools absolute TIP positioning


I need to position a Mootool events calendar inside an Iframe.

Unfortunately the tool tip which appears on a date with events, get always cut by the boundary of the Iframe.

How can I set the tooltip position so that it's always at x=0 and y=0 of the container div (here "calcontainer")?

Here the piece of code which generates the tip

if (this.showtip) {
newTip = new   Tips(eventDiv, {
fixed: true
});
eventDiv.store('tip:title', time).store('tip:text', this.options.cEvents[i].title + '<br /><i>' + this.options.cEvents[i].location +'</i>')
;
}

here the html

<div  class="calcontainer" >
<div id="calBody"></div>
</div>

calBody is the div containing the calendar

Thanks


Solution

  • Why do you want the tooltips to be positioned 0,0 to the container ? then people will not understand that this tooltip is relevant for that date.

    You set fixed:true - fixed is a flag that sais if the tooltip follow the mouse or stay fixed.

    what you can do is either enlarge the iframe so it will contains also the gap of the tooltips or use the tips attribute offset or windowPadding which you can read about in the Tips Docs