catonthecouchproductions
asked on
Calling lightbox - using inline data to show - jQuery FancyBox
Hey,
On this site: http://www.virtualgiftcardsystem.com/ - I am using this lightbox plugin: http://fancybox.net/
At the bottom of that layout, there are three buttons. They open inline HTML in a lightbox. My code to call it is below in the code box.
The problem is, is that I have them all showing on click, you can see them display and a scrollbar is added on click.
Any suggestions I can do to make it more dynamic so it only loads the one being clicked?
At the end of the day, I would like to be able to show it without the others loading.
thank you!
Ryan
I have also tried calling external HTML pages, but it sits there with the loading animation.
On this site: http://www.virtualgiftcardsystem.com/ - I am using this lightbox plugin: http://fancybox.net/
At the bottom of that layout, there are three buttons. They open inline HTML in a lightbox. My code to call it is below in the code box.
The problem is, is that I have them all showing on click, you can see them display and a scrollbar is added on click.
Any suggestions I can do to make it more dynamic so it only loads the one being clicked?
At the end of the day, I would like to be able to show it without the others loading.
thank you!
Ryan
I have also tried calling external HTML pages, but it sits there with the loading animation.
$(".load-content").fancybox({onStart:function(){$(".hide-data").show();},onCleanup:function(){$(".hide-data").hide()},'overlayOpacity': '.6','overlayColor':'#000000','titleShow': false});
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, each will open the div in the href.
It can still be implemented as dynamic but that would require detecting the related element and going through a loop of all the others with the same class setting their visibility to hidden.
I haven't done it that way before but the concept should be valid, it's just going to take much time and testing to make it work, and probably you'll still end with several lines of script which wouldn't be worth the effort unless you had a lot more than just 7
It can still be implemented as dynamic but that would require detecting the related element and going through a loop of all the others with the same class setting their visibility to hidden.
I haven't done it that way before but the concept should be valid, it's just going to take much time and testing to make it work, and probably you'll still end with several lines of script which wouldn't be worth the effort unless you had a lot more than just 7
ASKER
Exactly, I just went ahead and made each line have its own ID/call.
Thank you!
Ryan
Thank you!
Ryan
ASKER
Then each will open div X
Thanks,
Ryan