javascript - .delay() not working on my .show() JQuery -


i'm trying make footer disappear when on mobile device , when keyboard open. have working perfectly, issue footer reappears before keyboard has time close. because i'm using event textbox having focus not keyboard being open. thought best way resolve .delay() however, isn't working @ all. have ideas here?

<script>     var ismobileview = false; //global variable      $(document).ready(function () {          function setscreenwidthflag() {             var newwindowwidth = $(window).width();             if ( $(window).width() > 600) {                    ismobileview = false;             }             else {                 ismobileview = true;             }         }          $(".tbinputarea").focus(function() {             if(ismobileview)                 $("#footer").hide();         });          $(".tbinputarea").focusout(function() {             if(ismobileview)                 $("#footer").delay(500).show();         });          setscreenwidthflag();          $(window).on("resize", function (e) {             setscreenwidthflag();         });     });  </script> 

$("#footer").delay(500).show(0); 

try this.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -