Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2012-07-05 07:28:03

Eri
Member
Registered: 2011-03-18
Posts: 977

Lazy Load Plugin for jQuery

I am trying to add lazy load plugin http://www.appelsiini.net/projects/lazyload  on ASP but i am getting problems with the thumb preview

at header added

<script src="jquery.lazyload.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
	$("img.lazy").lazyload();
})
</script>

changed images with

<img class="lazy" src="img/grey.gif" data-original="<?php echo THUMB_URL,'/',path($video['video_id']),'/',$video['thumb']; ?>.jpg" alt="<?php echo e($video['title']); ?>" id="preview-video-<?php echo $video['video_id'].'-'.$video['thumb'].'-'.$video['thumbs']; ?>" width="160" heigh="120"/>

Best Adult Affilitate Network:
ExoClick
Best Deals on Dedicated Servers - CDN
INXY

Offline

#2 2012-07-05 08:27:27

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Lazy Load Plugin for jQuery

It will not work this way. Try to edit templates/your-template/js/jquery.main-0.1.js:

$(this).attr('src').match(/\/\d+\/\d+\/\d+\//);

to:

$(this).attr('data-original').match(/\/\d+\/\d+\/\d+\//);

Didnt test this, but it should work.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB