Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2010
    Location
    Halifax - UK
    Posts
    22
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Fancybox in a gallery help

    Does anyone have a solution? The first image works fine, but obviously when the image is changed by the second function it will not work????

    Code:
    <script type="text/javascript">
    jQuery(document).ready(function(){
     
      $("a#single_image").fancybox({
    		'transitionIn'	:	'elastic',
    		'transitionOut'	:	'elastic',
    		'speedIn'		:	600, 
    		'speedOut'		:	200, 
    		'overlayShow'	:	false
    	});
    
    });
    
    </script>
    </head>
    
    <body>
    <div class="hidden">
    	<script type="text/javascript">
    $(function() {
    $(".image").click(function() {
    var image = $(this).attr("rel");
    var large = $(this).attr("title");
    $('#image').hide();
    $('#image').fadeIn('slow');
    $('#image').html('<a href="' + large + '" id="single_image"><img src="' + image + '"/></a>');
    return false;
        });
    });
    	</script>

  • #2
    New Coder
    Join Date
    Nov 2010
    Location
    Halifax - UK
    Posts
    22
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Anyone?


  •  

    Posting Permissions

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