Results 1 to 2 of 2

Thread: jquery image enlarge using fancybox

  1. #1
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile jquery image enlarge using fancybox

    hello.... i need help for the image enlarge on mouse click..
    i follow the code from this site----> http://jsfiddle.net/jRsjK/
    and i edit that code like this-->
    Code:
    <html>
    <head>
    <title>Mayur Steels - Products</title>
    
    
    <!-- FancyBox -->
    <script type="text/javascript"  src="fancybox/jquery.fancybox.js"></script>
    <script type="text/javascript"  src="fancybox/jquery.fancybox.css"></script>
    <script  type="text/javascript">
    $(".fancybox").fancybox({
        helpers : {
            overlay : {
                css : {
                    'background' : 'rgba(58, 42, 45, 0.95)'
                }
            }
        }
    });
    </script>    
    </head>
    <body >
    
    
     <a rel="gallery" class="fancybox" href="images/mayur1.jpg" >
     <img src="images/gallery/bed1.jpg" /></a>
    
    		
    </body>
    </html>
    but the code is not working here...

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Assuming the fancy box script and css files are where you say they are, as well as the images:

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title>Mayur Steels - Products</title>
    
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
    <!-- FancyBox -->
    <link rel="stylesheet" href="fancybox/jquery.fancybox.css" type="text/css">
    <script type="text/javascript"  src="fancybox/jquery.fancybox.js"></script>
    <script  type="text/javascript">
    $(".fancybox").fancybox({
        helpers : {
            overlay : {
                css : {
                    'background' : 'rgba(58, 42, 45, 0.95)'
                }
            }
        }
    });
    </script>    
    </head>
    <body >
    
    
     <a rel="gallery" class="fancybox" href="images/mayur1.jpg" >
     <img src="images/gallery/bed1.jpg" /></a>
    
    		
    </body>
    </html>
    The browser cache may need to be cleared and/or the page refreshed to see changes.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Text and Image Crawler & FancyBox
    By ashwini223 in forum Dynamic Drive scripts help
    Replies: 7
    Last Post: 03-14-2013, 04:02 PM
  2. Image enlarge
    By megha in forum CSS
    Replies: 32
    Last Post: 06-20-2012, 09:08 AM
  3. Replies: 0
    Last Post: 06-29-2011, 03:37 PM
  4. iPad issue with CSS Image Gallery hover image enlarge
    By walkoffhomerun in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 06-26-2011, 07:55 PM
  5. simplegallery.js to work with jquery.fancybox.js
    By bennylondon in forum JavaScript
    Replies: 0
    Last Post: 01-29-2009, 08:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •