| |
Author |
Post |
|
#1 Tue Jun 19, 2012 3:30 pm
|
Member
Registered: Jun 2012
Posts: 2
|
I have the following code: <div id="test" class="naked floatbox" onclick="fb.start({ href:'#' })" style="cursor:pointer;"><img src="test.svg"></div> The above code works but it generates the default Floatbox visual style. How do I ensure that the Floatbox popup is styled with the "naked" class. Declaring a class on the DIV tag doesn't seem to work. Thanks in advance.
|
|
#2 Tue Jun 19, 2012 3:43 pm
|
Administrator
Registered: Aug 2008
Posts: 3382
|
That's a very old legacy syntax for the fb.start command. Let's use the simpler, current syntax. fb.start(source, options).
I wouldn't think a source of '#' would get you very far. That does not refer to a specific div. I would expect that to load the entire base page inside a floatbox - not likely what you're after.
Options go in the options parameter of the fb.start call (of all places). One available option is className, which has the equivalent effect as adding a classname to a starting anchor element.
Your fb.start call could look something like: fb.start('#myDivId', 'className:naked');
|
|
#3 Tue Jun 19, 2012 3:58 pm
|
Member
Registered: Jun 2012
Posts: 2
|
Admin, THANK YOU!!!! I was overlooking the className option in the onClick declaration. It works now. PS - I just used the "#" symbol as a URL stand in so I wouldn't muddy the question with a HUGE url path. I tried to make the code as simple as possible. Looks like my thought process confused you more then it helped. Anyway, your response solved my issue. « Last edit by MaloCS on Tue Jun 19, 2012 4:00 pm. »
|