Skip to content

Commit

Permalink
Move JavaScript to bottom.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuupola committed Nov 18, 2011
1 parent 715d47c commit db4b893
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 65 deletions.
15 changes: 7 additions & 8 deletions enabled.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@
<title>Lazy Load Enabled</title>
<meta name="generator" content="Mephisto" />
<link rel="alternate" type="application/atom+xml" href="http://feeds.feedburner.com/tuupola" title="Atom feed" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload();
});
</script>
<link href="http://www.appelsiini.net/stylesheets/main2.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#sidebar {
Expand Down Expand Up @@ -74,7 +67,13 @@ <h2>Plugin enabled</h2>

<div id="footer">
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload();
});
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-190966-1";
Expand Down
17 changes: 7 additions & 10 deletions enabled_container.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
<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" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({effect : "fadeIn", container: $("#container")});
});
</script>
<style type="text/css">
#sidebar {
width: 0px;
Expand All @@ -27,9 +20,7 @@
height: 600px;
overflow: scroll;
}

</style>

</head>

<body>
Expand Down Expand Up @@ -82,7 +73,13 @@ <h2>Plugin enabled on container</h2>

<div id="footer">
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({effect : "fadeIn", container: $("#container")});
});
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-190966-1";
Expand Down
18 changes: 9 additions & 9 deletions enabled_fadein.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@
<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" />
<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" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({
effect : "fadeIn"
});
});
</script>
<style type="text/css">
#sidebar {
width: 0px;
Expand Down Expand Up @@ -78,6 +69,15 @@ <h2>Plugin enabled with fadein effect</h2>
<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" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({
effect : "fadeIn"
});
});
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-190966-1";
Expand Down
18 changes: 9 additions & 9 deletions enabled_gazillion.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@
<title>Lazy Load Enabled With Gazillion Images</title>
<meta name="generator" content="Mephisto" />
<link rel="alternate" type="application/atom+xml" href="http://feeds.feedburner.com/tuupola" title="Atom feed" />
<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" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({
effect: "fadeIn"
});
});
</script>
<link href="http://www.appelsiini.net/stylesheets/main2.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#sidebar {
Expand Down Expand Up @@ -87,6 +78,15 @@ <h2>Plugin enabled with gazillion images</h2>
<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" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({
effect: "fadeIn"
});
});
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-190966-1";
Expand Down
26 changes: 12 additions & 14 deletions enabled_timeout.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@
<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" />
<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" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({
event : "sporty"
});
});
$(window).bind('load', function() {
var timeout = setTimeout(function() { $("img").trigger("sporty") }, 5000);
});
</script>
<style type="text/css">
#sidebar {
width: 0px;
Expand All @@ -29,7 +17,6 @@
}

</style>

</head>

<body>
Expand Down Expand Up @@ -84,7 +71,18 @@ <h2>Plugin enabled</h2>

<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" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({
event : "sporty"
});
});
$(window).bind('load', function() {
var timeout = setTimeout(function() { $("img").trigger("sporty") }, 5000);
});
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-190966-1";
Expand Down
14 changes: 7 additions & 7 deletions enabled_wide.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
<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" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({effect: "fadeIn"});
});
</script>
<style type="text/css">
#sidebar {
width: 0px;
Expand Down Expand Up @@ -76,6 +69,13 @@ <h2>Plugin enabled on Wide Page</h2>
<div id="footer">
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({effect: "fadeIn"});
});
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-190966-1";
Expand Down
16 changes: 8 additions & 8 deletions enabled_wide_container.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@
<title>Lazy Load Enabled on Horizontal Container</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" />
<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" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({container: $("#container")});
});
</script>
<link rel="alternate" type="application/atom+xml" href="http://feeds.feedburner.com/tuupola" title="Atom feed" />
<style type="text/css">
#sidebar {
width: 0px;
Expand Down Expand Up @@ -88,6 +81,13 @@ <h2>Plugin enabled on horizontal container</h2>
<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" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({container: $("#container")});
});
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-190966-1";
Expand Down

0 comments on commit db4b893

Please sign in to comment.