Is there any way to load the "small images" - background images after the dom is load ?
The problem here is i cant use something like lazyload on it and a large number of images end up in slow page load.
Something like:
<a href="images/1.jpg"><img src="images/1_tb.jpg" alt=""></a>
->
<a href="images/1.jpg"><img data-src="images/1_tb.jpg" alt=""></a>
~
var thumb = $('img', this).attr('src')
firstThumb = $('img', this)[0].src
->
var thumb = $('img', this).data('src')
firstThumb = $('img', this).data('src')
...
You can use
$(document).ready(function(){
instead of
$(window).on('load', function() {
then
Is there any way to load the "small images" - background images after the dom is load ?
The problem here is i cant use something like lazyload on it and a large number of images end up in slow page load.
Something like:
<a href="images/1.jpg"><img src="images/1_tb.jpg" alt=""></a>->
<a href="images/1.jpg"><img data-src="images/1_tb.jpg" alt=""></a>~
->
...
You can use
$(document).ready(function(){instead of
$(window).on('load', function() {then