image - How to avoid LazyLoad effect on specific class? -
currently using next code found on web:
(using jq instead of $ sign)
<script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="jquery.lazyload.mini.js"></script> <script type="text/javascript"> var jq = jquery.noconflict(); jq(function() { jq("img").lazyload({ placeholder : "template/eis_d25_022/common/grey.gif", effect : "fadein" }); });</script> the above code auto "lazyload" in forum without changing image class or image src etc. image specific class doesn't load , works:
<img src="straightlogo/what.png" class="vm" alt=" " original="straightlogo/what.png"> how avoid lazyload effect on vm class's image?? or how create vm class works??
you can exclude elements .not() selector.
jq("img").not(".vm").lazyload({ ... }); however easier if specify class of images want lazyloaded. illustration can utilize class lazy. note current version of plugin define placeholder in src attribute , real image in data-original attribute. example:
<img class="lazy" data-original=“img/example.jpg” src=“img/grey.gif” width=“640” height=“480”> then like:
jq("img.lazy").lazyload({ ... }); image conflict lazy-loading
No comments:
Post a Comment