Permalink
Browse files

fixed spacing issue for mobile

  • Loading branch information...
1 parent 1f0b9a0 commit d6e8930458762510b62f720593db9f2ff6117079 @sukhada committed Mar 15, 2013
Showing with 24 additions and 14 deletions.
  1. +24 −14 reddit.js
View
@@ -269,23 +269,33 @@ window.onload = function() {
}
}
-$("#open").on('mouseenter', function() {
- clearTimeout(r);
- $(".modal").removeClass("hide");
-});
+if ($(window).width > 704) {
+ $("#open").on('mouseenter', function() {
+ clearTimeout(r);
+ $(".modal").removeClass("hide");
+ });
-$(".modal").on('mouseleave', function() {
- r = setTimeout(function() {$(".modal").addClass("hide");},500);
-});
+ $(".modal").on('mouseleave', function() {
+ r = setTimeout(function() {$(".modal").addClass("hide");},500);
+ });
-$(".modal").on('mouseenter', function() {
- clearTimeout(r);
- $(".modal").removeClass("hide");
-});
+ $(".modal").on('mouseenter', function() {
+ clearTimeout(r);
+ $(".modal").removeClass("hide");
+ });
-$("#open").on('mouseleave', function() {
- r=setTimeout(function() {$(".modal").addClass("hide");},500);
-});
+ $("#open").on('mouseleave', function() {
+ r=setTimeout(function() {$(".modal").addClass("hide");},500);
+ });
+}
+
+else {
+ $("#open").on('click', function() {
+ $(".modal").toggleClass("hide");
+ });
+
+
+}
$(".close").click(function() {
$(".modal").addClass("hide");

0 comments on commit d6e8930

Please sign in to comment.