Created
May 3, 2013 15:59
-
-
Save nelsonJM/5510326 to your computer and use it in GitHub Desktop.
jQuery: Thumbnail Nav with colorbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| ( function ($) { | |
| $('.window-list.thumbs').on('click','img', function(){ // When someone clicks on a thumbnail | |
| var $this = $(this); | |
| $('#main-image').fadeOut("1000",function() { | |
| $('#main-image').attr('src',$this.attr('src').replace('-thumb','')).fadeIn("1000"); // Replace the Full Sized version of selected image | |
| }); | |
| $('#ss-lightbox').attr('href',$this.attr('src').replace('-thumb','')); | |
| }); | |
| })(jQuery); | |
| </script> | |
| <script type="text/javascript"> | |
| (function($) { | |
| $(".group1").colorbox({ | |
| opacity : 0.5, | |
| scalePhotos: true, | |
| maxWidth: "1000px", | |
| maxHeight: "450", | |
| innerWidth: "1000px", | |
| innerHeight: "450", | |
| width: "1000px", | |
| height: "450" | |
| }) | |
| })(jQuery); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment