Hello
I'm having a strange delay between the input content and the val value... I mean: the val value is always one step behind of the real content of the input box... I don't know what am I doing wrong... Would you please give me a clue?
THANK YOU!!!
- $(document).on("keydown", "aside form input[name='search-shop']", function(){
- var val = $(this).val().toLowerCase();
- if(val.length > 1){
- $(".galleryFront h2:contains('"+val+"')").closest('.gallery').fadeIn("slow").siblings('.gallery').hide();
- }else{
- $(".gallery").fadeIn("slow");
- }
- countResults();
- });