Link within popup

Page: 1

Author Post
Member
Registered: Mar 2011
Posts: 25
I have a page with several thumbnail images that use floatbox to popup enlargements over the image. I used your code from the documents:
<a href="image1.jpg" data-fb-options="caption:#myCaptionDiv">...</a> 
...
<div id="myCaptionDiv" style="display:none;">
<span style="color:#123456;"> Here's an HTML caption with <a href="//example.com">a link</a> </span>
</div>


I made a few minor modifications and this works fine. The thing is, I'd like to use it many times on the page, but you can only use an "id" once. I tried changing it to a class, but floatbox wants to see that '#'. As far as I can tell, the only way to do this multiple times is to make many ids ("#myCaptionDiv01", "#myCaptionDiv02", etc.). Is this right? I was hoping to define myCaptionDiv and all of its contents within a stylesheet.
Administrator
Registered: Aug 2008
Posts: 3374
Not sure I'm understanding the issue correctly. Certainly ids need to be unique. Otherwise, how would Floatbox or any other script know which one you mean to reference? And certainly assigning a class name to multiple elements is a standard way to assign css stylings to all those elements at once. So the caption source divs would have unique ids for referencing and a common class name for css styling.
Member
Registered: Mar 2011
Posts: 25
Yeah, I think what I'm asking is probably unrealistic. I'll create differently named IDs for the different links to be put in the captions.

Page: 1