Browse Source

Merge branch 'master' of github.com:desandro/isotope

pull/96/head
David DeSandro 13 years ago
parent
commit
55165ae3c8
  1. 16
      jquery.isotope.js
  2. 4
      jquery.isotope.min.js

16
jquery.isotope.js

@ -1,5 +1,5 @@
/** /**
* Isotope v1.3.110601 * Isotope v1.3.110604
* An exquisite jQuery plugin for magical layouts * An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co * http://isotope.metafizzy.co
* *
@ -1203,7 +1203,13 @@
return this; return this;
}; };
// helper function for logging errors
// $.error breaks jQuery chaining
var logError = function( message ) {
if ( this.console ) {
console.error( message );
}
};
// ======================= Plugin bridge =============================== // ======================= Plugin bridge ===============================
// leverages data method to either create or return $.Isotope constructor // leverages data method to either create or return $.Isotope constructor
@ -1220,11 +1226,13 @@
this.each(function(){ this.each(function(){
var instance = $.data( this, 'isotope' ); var instance = $.data( this, 'isotope' );
if ( !instance ) { if ( !instance ) {
return $.error( "cannot call methods on isotope prior to initialization; " + logError( "cannot call methods on isotope prior to initialization; " +
"attempted to call method '" + options + "'" ); "attempted to call method '" + options + "'" );
return;
} }
if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) { if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) {
return $.error( "no such method '" + options + "' for isotope instance" ); logError( "no such method '" + options + "' for isotope instance" );
return;
} }
// apply method // apply method
instance[ options ].apply( instance, args ); instance[ options ].apply( instance, args );

4
jquery.isotope.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save