jquery-slacker
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:jQuery plugin for lazy loading images
Slacker
=============

jQuery plugin for lazy loading images.

Why?
----
There are many great lazy load plugins out there, but none seemed to capture everything that I wanted to achieve for a project at the time.  So I 
created my own - with the specific aim that it would load different size/quality images on the fly and only when required.

HTML
----
### Basic

`
` `
` ### Multiple resolutions `
` ### High quality images You can split any resolution check into high and low quality image options. Slacker will detect if you are using a high pixel density ratio (current check is for > 1). `
` JavaScript ---------- ### Basic `$('.slacker').slacker();` ### Multiple resolutions `$('.slacker').slacker({ sizes : [640] });` ### Resize functionality This will allow multiple resolutions to be switched on the fly when resizing the browser. @resize - true|false; default=true; Enable/disable resize functionality.
@resizeThrottle - (millisecond); default=100; Throttle functionality will control how frequently the window resize event is fired. Higher number is less frequent. `$('.slacker').slacker({ resize : true , resizeThrottle : 100 });` ### Animation There are two handlers - 'beforeLoad' and 'onLoad'. `$('.slacker').slacker({ animate : { beforeLoad : function(el) { el.css({ opacity:0 }); } , onLoad : function(el) { el.animate({ opacity:1 }, 1000); } } });`
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。