Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
113 lines (93 sloc) 3.81 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Lazy Load Enabled With Nonscript Fallback</title>
<meta name="generator" content="Mephisto" />
<link href="http://www.appelsiini.net/stylesheets/main2.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/atom+xml" href="http://feeds.feedburner.com/tuupola" title="Atom feed" />
<style type="text/css">
#sidebar {
width: 0px;
}
#content {
width: 770px;
}
.lazy {
display: none;
}
</style>
</head>
<body>
<div id="wrap">
<div id="header">
<p>
<h1>Lazy Load</h1><br />
<small>Image lazy loader plugin for jQuery.</small>
<ul id="nav">
<li id="first"><a href="/" class="active">weblog</a></li>
<li><a href="/projects" class="last">projects</a></li>
<!--
<li><a href="/cv" class="last">cv</a></li>
-->
</ul>
</p>
</div>
<div id="content">
<h2>Plugin enabled with nonscript fallback</h2>
<div class="entry">
<p>
This page deprecates gracefully for non JavaScript browsers. It requires hiding
lazy loaded images with css and adding a &lt;noscript&gt; block which contains
the real image and it is shown when JavaScript is not enabled. If JavaScript is enabled
show() function is called before initializing Lazy Load plugin.
</p>
<code><pre>
/* CSS **/
.lazy {
display: none;
}
/* JS */
$("img.lazy").show().lazyload({
effect : "fadeIn"
});
/* HTML */
&lt;img class="lazy" src="img/grey.gif" data-original="img/example.jpg" width="765" height="574"&gt;
&lt;noscript&gt;&lt;img src="img/example.jpg" width="765" height="574"&gt;&lt;/noscript&gt;
</pre>
</code>
<img class="lazy" src="img/grey.gif" data-original="img/bmw_m1_hood.jpg" alt="BMW M1 Hood" width="765" height="574">
<img class="lazy" src="img/grey.gif" data-original="img/bmw_m1_side.jpg" width="765" height="574" alt="BMW M1 Side">
<img class="lazy" src="img/grey.gif" data-original="img/viper_1.jpg" width="765" height="574" alt="Viper 1">
<img class="lazy" src="img/grey.gif" data-original="img/viper_corner.jpg" width="765" height="574" alt="Viper Corner">
<img class="lazy" src="img/grey.gif" data-original="img/bmw_m3_gt.jpg" width="765" height="574" alt="BMW M3 GT">
<img class="lazy" src="img/grey.gif" data-original="img/corvette_pitstop.jpg" width="765" height="574" alt="Corvette Pitstop">
<noscript>
<img src="img/bmw_m1_hood.jpg" width="765" height="574" alt="BMW M1 Hood">
<img src="img/bmw_m1_side.jpg" width="765" height="574" alt="BMW M1 Side">
<img src="img/viper_1.jpg" width="765" height="574" alt="Viper 1">
<img src="img/viper_corner.jpg" width="765" height="574" alt="Viper Corner">
<img src="img/bmw_m3_gt.jpg" width="765" height="574" alt="BMW M3 GT">
<img src="img/corvette_pitstop.jpg" width="765" height="574" alt="Corvette Pitstop">
</noscript>
<div id="sidebar">
</div>
<div id="footer">
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.lazyload.js?v=3" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img.lazy").show().lazyload({
effect : "fadeIn",
failurelimit : 0
});
});
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-190966-1";
urchinTracker();
</script>
</body>
</html>