Position floatbox in relation to the host anchor

Page: 1

Author Post
Member
Registered: Aug 2012
Posts: 2
Hello,

Is it possible somehow to position floatbox relative to anchor element or anchor parent element?

I want to have a 'detail info pop-up box' that opens only when link is clicked (not onmouseover) and on the right side of the link (element).

But because there are many links (elements) and they are positioned on different parts of the page, i want this floatbox to open near each element (on the right side) and not always in the fixed page position (relative to the viewport).

Thank you
Administrator
Registered: Aug 2008
Posts: 3382
It sounds like an fbContext box might be just what you are looking for. Check out the examples half way down the 'Bonus2' tab of the Demo page.

If that's not what you're looking for, note that the boxLeft and boxTop options will accept a setting of 'click' to position the opened box at the mouse-click location.
Member
Registered: Aug 2012
Posts: 2
fbContext box performs the way I want but can I configure Context Box the way I configure float box?

Can i add close(X) button to the Context Box?

Can i set boxLeft or boxTop parameters to the Context Box?

If no, then I have to use 'click' value for floatbox boxLeft or boxTop, but then again, can I use click and set top - 20px and left - 40px?

Thank you
« Last edit by Lionblu2000 on Tue Aug 07, 2012 3:28 pm. »
Administrator
Registered: Aug 2008
Posts: 3382
The fbContext boxes are really just normal floatboxes with certain appearance and behaviour options set. You can add most of the standard option settings to a context box to make it appear as you wish. The only things you can't do with context boxes is enable resize animations or set modal:true and show the translucent page overlay.

For your reference, here's the default settings that are applied to context boxes.
	boxLeft: 'click',
boxTop: 'click',
centerOnResize: false,
colorTheme: 'white',
enableDragMove: false,
enableDragResize: false,
closeOnClick: false,
innerBorder: 0,
outerBorder: 1,
padding: 0,
roundCorners: 'none',
scrolling: 'no',
shadowSize: 8,
shadowType: 'hybrid',
showClose: false,
showOuterClose: false,
titleAsCaption: false


Floatbox currently doesn't have a way to set boxLeft to 20px left of where the mouse was clicked, nor to open a floatbox (other than tooltips) positioned at an element on the underlying page.

Page: 1