Skip to content
This repository

animation speed #148

Closed
wants to merge 2 commits into from

2 participants

Kanstantsin Kamkou Glenn Nelson
Kanstantsin Kamkou

Hello Paul, please review. Customer doesn't like animation at all.

Glenn Nelson 67726e closed this November 03, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 10 additions and 8 deletions. Show diff stats Hide diff stats

  1. 18  jquery.infinitescroll.js
18  jquery.infinitescroll.js
@@ -156,7 +156,7 @@
156 156
 			
157 157
 			// determine loading.finished actions
158 158
 			opts.loading.finished = opts.loading.finished || function() {
159  
-				opts.loading.msg.fadeOut('normal');
  159
+				opts.loading.msg.fadeOut(opts.loading.speed);
160 160
 			};
161 161
 
162 162
             // callback loading
@@ -422,13 +422,15 @@
422 422
 				return;
423 423
 			}
424 424
 
425  
-            opts.loading.msg
426  
-	    		.find('img')
427  
-	    		.hide()
428  
-	    		.parent()
429  
-	    		.find('div').html(opts.loading.finishedMsg).animate({ opacity: 1 }, 2000, function () {
430  
-	    		    $(this).parent().fadeOut('normal');
431  
-	    		});
  425
+            if (opts.loading.finishedMsg) {
  426
+                opts.loading.msg
  427
+                    .find('img').hide().parent().find('div')
  428
+                    .html(opts.loading.finishedMsg).animate({ opacity: 1 }, 2000, function () {
  429
+                        $(this).parent().fadeOut(opts.loading.speed);
  430
+                    });
  431
+            } else {
  432
+                opts.loading.msg.fadeOut(opts.loading.speed);
  433
+            }
432 434
 
433 435
             // user provided callback when done    
434 436
             opts.errorCallback.call($(opts.contentSelector)[0],'done');
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.