Is there any way of putting a floatbox and an enhanced tooltip on the same element, but with different formatting? I want boxColor to be white for the floatbox (a slideshow) but blue in the tooltip.
Thanks
Floatbox and Tooltip Together
Page: 1
Author | Post |
---|---|
#1 Fri Oct 04, 2013 9:02 pm
|
|
Member
Registered: Jan 2012
Posts: 98
|
|
#2 Sat Oct 05, 2013 2:02 am
|
|
Administrator
Registered: Aug 2008
Posts: 3382
|
Yes, no problem. Assign the floatbox class to get floatbox behaviour and the fbTooltip class to get tooltip behaviour. (Multiple classes can be separated by a space, as in class="floatbox fbTooltip".)
The floatbox will get its options from the data-fb-options attribute while the tooltip will get its options from the data-fb-tooltip attribute, so there's no conflict in assigning different options to the different components. |
#3 Mon Oct 07, 2013 9:56 am
|
|
Member
Registered: Jan 2012
Posts: 98
|
Thanks, Admin. I had hoped to do the formating with classes, to save the cumbersome stuff attached to each element. I imagine that's not possible though.
|
#4 Mon Oct 07, 2013 10:41 am
|
|
Administrator
Registered: Aug 2008
Posts: 3382
|
You can assign options through different class names by using the className option instead of the element's class attribute.
For example: <a href="abc.html" class="floatbox fbTooltip" When testing this to make sure I'm not handing out false information, I discovered that you need to set attachToHost:true for the tooltip to make the handling of clicks on the host element coherent for the user. The attachToHost option could of course be assigned through the presence of the "whatever" class in the above example. |
#5 Mon Oct 07, 2013 9:29 pm
|
|
Member
Registered: Jan 2012
Posts: 98
|
That's much better for when the data-fb-xxxx gets long and complex. Thanks.
|
Page: 1