Lazy loading with images in a span tag


I’ve implemented lazy loading on my website using this guide : -

However I can’t get the last bit of code to work! Basically I have images that are in a span tag loaded as a background image, I have this is the CSS : -

.blocks1 .block a span.thumb {
width: 120px;
height: 90px;
background-repeat: no-repeat;
background-position: center;
background-size: contain;
margin: 0 auto

The page uses this tpl file for the images : -

{section name=c loop=$cats->mCats}



I thought this script may have worked : -

But I couldn’t get that to work either.

Any idea’s whether this can be done & if so how?!

Many thanks for any help on this one :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service