Skip to content

Commit

Permalink
nick hates whitespace apparently
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisantonellis committed Apr 26, 2016
2 parents 67d2f12 + 81c684e commit 5668bd8
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 6 deletions.
17 changes: 16 additions & 1 deletion build/js/freezeframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ var freezeframe = (function($) {

}


}

})();
Expand Down Expand Up @@ -335,9 +334,25 @@ var freezeframe = (function($) {
// jQuery plugin
$.fn.freezeframe = function(_options) {

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

var ff = new freezeframe(_options);

ff.images = this;

ff.setup().attach();

var self = this;
var methods = ['trigger', 'release'];
methods.forEach(function(method) {
self[method] = function() {
ff[method](self.selector);
return self;
};
});

return this;
};
1 change: 0 additions & 1 deletion build/js/freezeframe.min.js

This file was deleted.

17 changes: 16 additions & 1 deletion build/js/freezeframe.pkgd.js
Original file line number Diff line number Diff line change
Expand Up @@ -10325,7 +10325,6 @@ var freezeframe = (function($) {

}


}

})();
Expand Down Expand Up @@ -10397,9 +10396,25 @@ var freezeframe = (function($) {
// jQuery plugin
$.fn.freezeframe = function(_options) {

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

var ff = new freezeframe(_options);

ff.images = this;

ff.setup().attach();

var self = this;
var methods = ['trigger', 'release'];
methods.forEach(function(method) {
self[method] = function() {
ff[method](self.selector);
return self;
};
});

return this;
};
3 changes: 0 additions & 3 deletions build/js/freezeframe.pkgd.min.js

This file was deleted.

3 changes: 3 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@
<button class="start">start</button><button class="stop">stop</button>
<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/56141f2be4b0a4afc2d17505/56141f47e4b00b973f0ec806/1444159323808/Ecco-Domani-Summer-Cinemagraph-980px.gif?format=1000w" />

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

</body>
Expand Down
16 changes: 16 additions & 0 deletions src/js/freezeframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,25 @@ var freezeframe = (function($) {
// jQuery plugin
$.fn.freezeframe = function(_options) {

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

var ff = new freezeframe(_options);

ff.images = this;

ff.setup().attach();

var self = this;
var methods = ['trigger', 'release'];
methods.forEach(function(method) {
self[method] = function() {
ff[method](self.selector);
return self;
};
});

return this;
};

0 comments on commit 5668bd8

Please sign in to comment.