Fixed left-right bug, and afterresetting bug

This commit is contained in:
Kasper Rynning-Tønnesen
2015-01-31 00:26:22 +01:00
parent f7b2575b7b
commit 02a5106b8d

View File

@@ -19,7 +19,7 @@ $(document).ready(function()
$(".search_input").focus(); $(".search_input").focus();
$(".search_input").keyup(function(event) { $(".search_input").keyup(function(event) {
if (event.keyCode != 40 && event.keyCode != 38 && event.keyCode != 13) { if (event.keyCode != 40 && event.keyCode != 38 && event.keyCode != 13 && event.keyCode != 39 && event.keyCode != 37) {
var search_input = $(this).val(); var search_input = $(this).val();
if(search_input.length < 3){$("#results").html("");} if(search_input.length < 3){$("#results").html("");}
if(event.keyCode == 13){ if(event.keyCode == 13){
@@ -28,6 +28,7 @@ $(document).ready(function()
$("#results").html(""); $("#results").html("");
$(".main").removeClass("blurT"); $(".main").removeClass("blurT");
}else{ }else{
i = 0;
timer=100; timer=100;
} }
} }
@@ -39,7 +40,6 @@ $(document).ready(function()
timer--; timer--;
if(timer===0){ if(timer===0){
search($(".search_input").val()); search($(".search_input").val());
i = 0;
} }
}, 1); }, 1);
}); });