Skip to content

Commit

Permalink
fixed jquery methods loop
Browse files Browse the repository at this point in the history
  • Loading branch information
nickforddev committed Apr 24, 2016
1 parent 62a4379 commit 401762d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions build/js/freezeframe.js
Expand Up @@ -334,14 +334,14 @@ var freezeframe = (function($) {
// jQuery plugin
$.fn.freezeframe = function(_options) {

var self = this;
var ff = new freezeframe(_options);

if (this.length == 0) {
console.warn('✨ freezeframe.js ✨ : no images found for selector ' + this.selector);
return false;
}

var self = this;
var ff = new freezeframe(_options);

// Make sure the methods are accessible on the jQuery object
var methods = [
'capture',
Expand All @@ -350,7 +350,7 @@ $.fn.freezeframe = function(_options) {
'release'
];

methods.forEach(function(index, method) {
methods.forEach(function(method) {
self[method] = ff[method];
});

Expand Down
8 changes: 4 additions & 4 deletions build/js/freezeframe.pkgd.js
Expand Up @@ -10396,14 +10396,14 @@ var freezeframe = (function($) {
// jQuery plugin
$.fn.freezeframe = function(_options) {

var self = this;
var ff = new freezeframe(_options);

if (this.length == 0) {
console.warn('✨ freezeframe.js ✨ : no images found for selector ' + this.selector);
return false;
}

var self = this;
var ff = new freezeframe(_options);

// Make sure the methods are accessible on the jQuery object
var methods = [
'capture',
Expand All @@ -10412,7 +10412,7 @@ $.fn.freezeframe = function(_options) {
'release'
];

methods.forEach(function(index, method) {
methods.forEach(function(method) {
self[method] = ff[method];
});

Expand Down
2 changes: 1 addition & 1 deletion examples/index.html
Expand Up @@ -108,7 +108,7 @@
<img class="my_class_3 freezeframe-responsive" src="http://static1.squarespace.com/static/51c748abe4b0c275d0aa86bf/56141631e4b0095d43132f02/5614164be4b0652b31fbd0a5/1444744817955/parislove9801.gif" />

<p>responsive,<br />jQuery plugin.</p>
<!-- <img class="my_class_4 freezeframe-responsive" src="http://static1.squarespace.com/static/51c748abe4b0c275d0aa86bf/56141631e4b0095d43132f02/5614164be4b0652b31fbd0a5/1444744817955/parislove9801.gif" /> -->
<img class="my_class_4 freezeframe-responsive" src="http://static1.squarespace.com/static/51c748abe4b0c275d0aa86bf/56141631e4b0095d43132f02/5614164be4b0652b31fbd0a5/1444744817955/parislove9801.gif" />

<p>cinemagraphs by <a href="http://www.cinemagraphs.com/">cinemagraphs.com</a>

Expand Down
8 changes: 4 additions & 4 deletions src/js/freezeframe.js
Expand Up @@ -334,14 +334,14 @@ var freezeframe = (function($) {
// jQuery plugin
$.fn.freezeframe = function(_options) {

var self = this;
var ff = new freezeframe(_options);

if (this.length == 0) {
console.warn('✨ freezeframe.js ✨ : no images found for selector ' + this.selector);
return false;
}

var self = this;
var ff = new freezeframe(_options);

// Make sure the methods are accessible on the jQuery object
var methods = [
'capture',
Expand All @@ -350,7 +350,7 @@ $.fn.freezeframe = function(_options) {
'release'
];

methods.forEach(function(index, method) {
methods.forEach(function(method) {
self[method] = ff[method];
});

Expand Down

0 comments on commit 401762d

Please sign in to comment.