Browse Source

rm lazyload from other pages

windhamdavid 1 year ago
parent
commit
e50e106d61
2 changed files with 22 additions and 18 deletions
  1. 0 17
      js/init.js
  2. 22 1
      js/lazyload.js

+ 0 - 17
js/init.js

@@ -25,23 +25,6 @@ $(document).on('click', '[data-toggle="lightbox"]', function(event) {
 	$(this).ekkoLightbox();
 });
 
-$(function() {
-	$("img.lazy").lazyload();
-});
-
-$('.imageHoverLoad').mouseenter(function() {
-	var elem = $(this);
-	elem.fadeOut(400).promise().done(function() {
-		elem.attr('src', elem.attr('data-hover')).fadeIn(400);
-	});
-});
-
-$('.imageHoverLoad').mouseleave(function() {
-	var elem = $(this);
-	elem.fadeOut(400).promise().done(function() {
-		elem.attr('src', elem.attr('data-original')).fadeIn(400);
-	});
-});
 
 $('#front-carousel').carousel({
     interval: 8000

+ 22 - 1
js/lazyload.js

@@ -239,4 +239,25 @@
         "left-of-fold"   : function(a) { return !$.rightoffold(a, {threshold : 0}); }
     });
 
-})(jQuery, window, document);
+})(jQuery, window, document);
+
+
+
+
+$(function() {
+	$("img.lazy").lazyload();
+});
+
+$('.imageHoverLoad').mouseenter(function() {
+	var elem = $(this);
+	elem.fadeOut(400).promise().done(function() {
+		elem.attr('src', elem.attr('data-hover')).fadeIn(400);
+	});
+});
+
+$('.imageHoverLoad').mouseleave(function() {
+	var elem = $(this);
+	elem.fadeOut(400).promise().done(function() {
+		elem.attr('src', elem.attr('data-original')).fadeIn(400);
+	});
+});