0

I have the following setup:

  • Index.html
  • Signup.html
  • Login.html

I want to call signup and login.html from index.html using a fancybox ajax call, but also be able to access the standalone pages. This means they all need to have a and include all css/js files. However this also means that two versions of jquery etc are being loaded when I'm calling them via an ajax call and this ends up causing other issues.

Is there an easy way to stop the loading on fancybox ajax calls?

Currently I simply have the following html:

<li><a class="fancybox fancybox.ajax" href="signup.html">Sign up</a></li>

And this JS:

  $(".fancybox").fancybox({
    fitToView   : true,
    autoDimensions : true,
    closeClick  : false,
    closeEffect : 'none',
    padding : 0
  });
Nick
  • 382
  • 1
  • 8
  • 26
  • http://stackoverflow.com/a/10546683/1055987 of course you may need to wrap your content and target the ID of that wrapper – JFK Nov 26 '13 at 18:03
  • 1
    possible duplicate of [load specific div in modal window using fancybox](http://stackoverflow.com/questions/10544021/load-specific-div-in-modal-window-using-fancybox) – JFK Nov 26 '13 at 18:04

1 Answers1

0

As per JFK's comment, you can simply add #div-name to the end of the href:

<li><a class="fancybox fancybox.ajax" href="signup.html #div-name">Sign up</a></li>
Nick
  • 382
  • 1
  • 8
  • 26