Link to home
Start Free TrialLog in
Avatar of catonthecouchproductions
catonthecouchproductionsFlag for United States of America

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.



$(".load-content").fancybox({onStart:function(){$(".hide-data").show();},onCleanup:function(){$(".hide-data").hide()},'overlayOpacity': '.6','overlayColor':'#000000','titleShow': false});

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of remorina
remorina
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of catonthecouchproductions

ASKER

I thought of that, but I didnt want to have 7 extra lines, wasnt sure if there was a more dynamic way. But if that seems to be the way, I can go ahead with that.

Then each will open div X

Thanks,

Ryan
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
Exactly, I just went ahead and made each line have its own ID/call.

Thank you!

Ryan