Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move the js inline call in the js file

git-svn-id: https://plugins.svn.wordpress.org/crazy-lazy/trunk@820731 b8457f37-d9ea-0310-8a92-e5e31aec5664
  • Loading branch information...
commit af47452c2c45226c6b26eef8533e54fe228a6919 1 parent 86af5d3
sergej.mueller authored
Showing with 10 additions and 10 deletions.
  1. +1 −8 crazy-lazy.php
  2. +8 −1 js/jquery.unveil.js
  3. +1 −1  js/jquery.unveil.min.js
9 crazy-lazy.php
View
@@ -138,7 +138,7 @@ public static function print_scripts()
* Call unveil lazy load jQuery plugin
*
* @since 0.0.5
- * @change 0.0.5
+ * @change 0.0.9
*/
private static function _print_jquery_lazyload()
@@ -157,13 +157,6 @@ private static function _print_jquery_lazyload()
'',
true
);
-
- /* Touch script */
- $wp_scripts->add_data(
- 'unveil.js',
- 'data',
- 'jQuery(document).ready(function(){ jQuery("img.crazy_lazy").show(0).unveil(); });'
- );
}
/**
9 js/jquery.unveil.js
View
@@ -62,4 +62,11 @@
return this;
};
-})(window.jQuery);
+})(window.jQuery);
+
+
+jQuery(document).ready(
+ function(){
+ jQuery("img.crazy_lazy").show(0).unveil();
+ }
+);
2  js/jquery.unveil.min.js
View
@@ -9,4 +9,4 @@
* Licensed under the MIT license.
*/
-;(function(c){c.fn.unveil=function(){function b(){e=a.filter(function(){var f=c(this),g=d.scrollTop(),b=g+d.height(),a=f.offset().top;return a+f.height()>=g&&a<=b});h=e.trigger("unveil");a=a.not(h)}var d=c(window),a=this,h,e;this.one("unveil",function(){var a=c(this),b=a.data("src");b&&a.css("opacity",0).attr("src",b).animate({opacity:1},200)});d.scroll(b);d.resize(b);b();return this}})(window.jQuery);
+ (function(c){c.fn.unveil=function(){function b(){e=a.filter(function(){var f=c(this),g=d.scrollTop(),b=g+d.height(),a=f.offset().top;return a+f.height()>=g&&a<=b});h=e.trigger("unveil");a=a.not(h)}var d=c(window),a=this,h,e;this.one("unveil",function(){var a=c(this),b=a.data("src");b&&a.css("opacity",0).attr("src",b).animate({opacity:1},200)});d.scroll(b);d.resize(b);b();return this}})(window.jQuery);jQuery(document).ready(function(){jQuery("img.crazy_lazy").show(0).unveil()});
Please sign in to comment.
Something went wrong with that request. Please try again.