Access our premium support and let us know your problems, we will help you solve them.

0
No products in the cart.

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Triggering FancyBox from a DIV onclick(); #10128
    blankpythonian29033
    Participant

    I was doing the same thing and wanted to invoke fancybox dynamically also
    I know it might not be ideal, but this is what i did (I use jquery btw):

    JS:

    jQuery(document).ready(function($){
        $(".fancybox").fancybox();
        $("form").submit(function(){
            $(".fancybox").trigger("click");
            return false;
        });
    });
    

    HTML:

    <a href="#div_id" class="fancybox"></a>
    <div style="display:none;">
         <div id="div_id">
             This will show up in my fancybox
         </div>
    </div>
    

    it’s a quicker easier way; I found, hope it helps someone!
    happy coding!

Viewing 1 post (of 1 total)