Fancybox PDF integration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gautamz07
    New Member
    • Sep 2013
    • 26

    Fancybox PDF integration

    This is the html code

    Code:
    <div class="col-md-4 col-md-offset-1" >
                  <h2>menu card</h2>
                  <a class="fancybox" href="menu.pdf" target="blank"><img src="images/menu-front-icon.png"></a>
                  <p></p>
                </div>
    I have included the fancybox in the script tag .

    Code:
    <script src="fancybox/jquery.fancybox-1.3.4.min.js"></script>
    and here is the Jquery Code

    Code:
    <script type="text/javascript">
      $(document).ready(function() {
      $('.fancybox').fancybox({
     
        openEffect  : 'none',
        closeEffect : 'none',
      });
    }); // end ready
    </script>
    Now let me explain what i am trying to do . First of all i am using the fancyBox plug-in , what it is suppose to do is stop the page from redirecting to a new page when the user clicks on the link which contains the pdf file .

    but the page still redirects . why ? what am i not doing here ?

    Thank you .

    regards .

    Gautam
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    most people seem to use the iframe type for displaying PDFs in fancybox …

    Comment

    • gautamz07
      New Member
      • Sep 2013
      • 26

      #3
      WOW ! you really saved my LIFE MAN ! Ur a Life saver , it worked in my demo project , now just Need to apply it to my real projects .

      Thank you .

      Gautam

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        actually, all I did was typing your question into google and cross-read some of the promising-looking results.

        Comment

        Working...