Skip to content

Commit

Permalink
load started added as soon as laziestloader starts downloading media
Browse files Browse the repository at this point in the history
  • Loading branch information
sjwilliams committed Sep 28, 2015
1 parent bc82949 commit 2ee0384
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "laziestloader",
"version": "0.6.1",
"version": "0.6.2",
"homepage": "https://github.com/sjwilliams/laziestloader",
"authors": [
"Josh Williams <[email protected]>"
Expand Down
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,11 @@ <h2>Trigger</h2>

<section id="releasehistory">
<h2>Release History</h2>
<h4>0.6.2</h4>
<ul>
<li>Added a class of "ll-loadstarted" to indicte that media has started but, perhaps, hasn't finished downloading.</li>
</ul>

<h4>0.6.1</h4>
<ul>
<li>Correct copyright date.</li>
Expand Down
8 changes: 6 additions & 2 deletions jquery.laziestloader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @preserve LaziestLoader - v0.6.1 - 2015-09-24
* @preserve LaziestLoader - v0.6.2 - 2015-09-28
* A responsive lazy loader for jQuery.
* http://sjwilliams.github.io/laziestloader/
* Copyright (c) 2015 Josh Williams; Licensed MIT
Expand Down Expand Up @@ -136,8 +136,12 @@
}
}

// applied immediately to reflect that media has started but,
// perhaps, hasn't finished downloading.
$el.addClass('ll-loadstarted');

// Determine when to fire `loaded` event. Wait until
// media is truly loaded if possible, otherwise immediately
// media is truly loaded if possible, otherwise immediately.
if (options.setSourceMode && (this.nodeName === 'IMG' || this.nodeName === 'VIDEO' || this.nodeName === 'AUDIO') ) {
if (this.nodeName === 'IMG') {
this.onload = function() {
Expand Down
4 changes: 2 additions & 2 deletions jquery.laziestloader.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "laziestloader",
"version": "0.6.1",
"version": "0.6.2",
"author": "Josh Williams <[email protected]>",
"description": "A responsive-aware jQuery plugin to smartly lazy load images and trigger callbacks.",
"repository": {
Expand Down

0 comments on commit 2ee0384

Please sign in to comment.