Browse files

fix of epty callback error, closes #19

  • Loading branch information...
1 parent ff65027 commit 6610c32e6961bd8a27e3190e1e4f9db04f430b58 @darsain darsain committed Feb 2, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 jquery.imagesloaded.js
View
9 jquery.imagesloaded.js
@@ -1,11 +1,10 @@
/*!
- * jQuery imagesLoaded plugin v1.2.2
+ * jQuery imagesLoaded plugin v1.2.3
* http://github.com/desandro/imagesloaded
*
* MIT License. by Paul Irish et al.
*/
-
-(function($, undefined) {
+;(function($, undefined) {
// $('#my-container').imagesLoaded(myFunction)
// or
@@ -46,7 +45,9 @@ $.fn.imagesLoaded = function( callback ) {
}
}
- callback.call( $this, $images, $proper, $broken );
+ if ( $.isFunction( callback ) ) {
+ callback.call( $this, $images, $proper, $broken );
+ }
}
function imgLoaded( event ) {

0 comments on commit 6610c32

Please sign in to comment.