I wrote some code which is activated when user clicks on input box. I used jQuery("#mydiv").focus();
, however, I ran into another problem. Once this is triggered, even if user lost focus from the input box the script runs and requires information wich results in another script breaking (i tried .keyup()
and .click()
everything had the same result). I want the script run only when the input box has focus, if user clicks off, the script should be inactive. Is it possible to do?
问问题
283 次