469,344 Members | 6,090 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,344 developers. It's quick & easy.

Fancybox PDF integration

gautamz07
This is the html code

Expand|Select|Wrap|Line Numbers
  1. <div class="col-md-4 col-md-offset-1" >
  2.               <h2>menu card</h2>
  3.               <a class="fancybox" href="menu.pdf" target="blank"><img src="images/menu-front-icon.png"></a>
  4.               <p></p>
  5.             </div>
  6.  
I have included the fancybox in the script tag .

Expand|Select|Wrap|Line Numbers
  1. <script src="fancybox/jquery.fancybox-1.3.4.min.js"></script>
  2.  
and here is the Jquery Code

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.   $(document).ready(function() {
  3.   $('.fancybox').fancybox({
  4.  
  5.     openEffect  : 'none',
  6.     closeEffect : 'none',
  7.   });
  8. }); // end ready
  9. </script>
  10.  
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
May 30 '14 #1
3 2083
Dormilich
8,652 Expert Mod 8TB
most people seem to use the iframe type for displaying PDFs in fancybox
May 30 '14 #2
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
May 30 '14 #3
Dormilich
8,652 Expert Mod 8TB
actually, all I did was typing your question into google and cross-read some of the promising-looking results.
May 30 '14 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.