Created
          June 29, 2013 05:46 
        
      - 
      
- 
        Save ckng/5889994 to your computer and use it in GitHub Desktop. 
    lazy load bootstrap carousel
  
        
  
    
      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
    
  
  
    
  | $('#myCarousel').on('slid', function() { | |
| var $nextImage = $('.active.item', this).next('.item').find('img'); | |
| $nextImage.attr('src', $nextImage.data('lazy-load-src')); | |
| }); | 
  
    
      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
    
  
  
    
  | <div id="myCarousel" class="carousel slide"> | |
| <div class="carousel-inner"> | |
| <div class="active item"> | |
| <img src="img/bigimage1.jpg" class="img-big"> | |
| </div> | |
| <div class="item"> | |
| <img data-lazy-load-src="img/bigimage1.jpg" class="img-big"> | |
| </div> | |
| </div> | |
| </div> | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment