Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2013
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.60 KB | None | 0 0
  1. <!DOCTYPE html>
  2.  
  3. .....
  4.  
  5. <script src="./pgod_files/jquery.isotope.min.js"></script>
  6. <script>
  7.     (function($){
  8.        
  9.         var $container = null;
  10.        
  11.         $(document).on('ready', function(){
  12.            
  13.             $container = $('#container');
  14.  
  15.             $container.isotope({
  16.                 masonry: {
  17.                     columnWidth: 300
  18.                 },
  19.                 filter: '.home, .all'
  20.             });
  21.  
  22.  
  23.             // filter items when filter link is clicked
  24.             $('.filters a').on('click', function(event){
  25.                 event.preventDefault();
  26.                 var selector = $(this).attr('data-filter');
  27.                 $container.isotope({filter: selector});
  28.  
  29.                 $('html, body').animate({scrollTop: 0}, 600);
  30.             });
  31.         });
  32.  
  33.     })(jQuery);
  34.  
  35.  
  36. </script>
  37. <style>
  38.     .isotope,
  39.     .isotope .isotope-item {
  40.         /* change duration value to whatever you like */
  41.         -webkit-transition-duration: 0.8s;
  42.            -moz-transition-duration: 0.8s;
  43.             -ms-transition-duration: 0.8s;
  44.              -o-transition-duration: 0.8s;
  45.             transition-duration: 0.8s;
  46.     }
  47.  
  48.     .isotope .isotope-item {
  49.         -webkit-transition-property: -webkit-transform, opacity;
  50.            -moz-transition-property:    -moz-transform, opacity;
  51.             -ms-transition-property:     -ms-transform, opacity;
  52.              -o-transition-property:      -o-transform, opacity;
  53.             transition-property:         transform, opacity;
  54.     }
  55.  
  56.     /**** disabling Isotope CSS3 transitions ****/
  57.  
  58.     .isotope.no-transition,
  59.     .isotope.no-transition .isotope-item,
  60.     .isotope .isotope-item.no-transition {
  61.         -webkit-transition-duration: 0s;
  62.            -moz-transition-duration: 0s;
  63.             -ms-transition-duration: 0s;
  64.              -o-transition-duration: 0s;
  65.             transition-duration: 0s;
  66.     }
  67. </style>
  68.  
  69.  
  70.  
  71. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement