Skip to content

Commit

Permalink
Remove deprecated jQuery load method
Browse files Browse the repository at this point in the history
.load was deprecated in jQuery 3. Fixing this seems to get the plugin working while still maintaining compatibility with jQuery 2.

See https://blog.jquery.com/2015/07/13/jquery-3-0-and-jquery-compat-3-0-alpha-versions-released/.
  • Loading branch information
JamesMcMahon authored Jun 20, 2016
1 parent 4ebda1e commit 3080f67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/jquery.vide.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@
callback(this.src);
};

$('<img src="' + path + '.gif">').load(onLoad);
$('<img src="' + path + '.jpg">').load(onLoad);
$('<img src="' + path + '.jpeg">').load(onLoad);
$('<img src="' + path + '.png">').load(onLoad);
$('<img src="' + path + '.gif">').on('load', onLoad);
$('<img src="' + path + '.jpg">').on('load', onLoad);
$('<img src="' + path + '.jpeg">').on('load', onLoad);
$('<img src="' + path + '.png">').on('load', onLoad);
}

/**
Expand Down

0 comments on commit 3080f67

Please sign in to comment.