Permalink
Browse files

trying to optimize picture preview for mobile

  • Loading branch information...
sukhada committed Mar 15, 2013
1 parent fe65860 commit d824121f7ecd21a720d38ee9503262331f3be8b1
Showing with 3 additions and 2 deletions.
  1. +3 −2 reddit.js
View
@@ -297,7 +297,8 @@ $(document).on("mouseenter", "a", function(e) {
$("#img").css("top", e.pageY - 10);
$("#img").css("left", 0);
$(this).css("color", "#05B8CC");
- $("#img").append("<img class='image' src='"+ link +"'></img>")
+ $("#img").append("<img class='image' src='"+ link +"'></img>")
+ setTimeout(function() {$("#img").empty();}, 3000);
}
}
}
@@ -323,7 +324,7 @@ if ($(window).width > 704) {
});
}
else {
- setTimeout(function() {$("#img").empty();}, 3000);
+
}

0 comments on commit d824121

Please sign in to comment.