KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to have the bootstrap Carousel lazy load. It seems like this should be straight forward, but I'm not even getting any errors here to troubleshoot. JS: <script type="text/javascript"> $('#bigCarousel').on("slid", function() { // load the next image after the current one slid var $nextImage = $('.active.item', this).next('.item').find('img'); $nextImage.attr('src', $nextImage.data('lazy-load-src')); }); </script> And then html: <div id="bigCarousel" class="carousel slide"> <div class="carousel-inner"> <div class="active item"> <img src="assets/bigimage1.jpg" class="img-big"> </div> <div class="item"> <img data-lazy-load-src="assets/menu-header2.jpg" class="img-big"> </div> </div> </div> No JS errors in firebug or anything else I can figure out, but my images just aren't loading. Probably something stupidly simple here...
Tags (comma-separated)
Save Edits
Cancel