This one is kinda complicated so the title might not do it justice.
I have a google places autofill suggester that shows up on keypress. In it, there is an “x” button to close the suggester if a user doesn’t need it/want it. Only problem is, when they start to type again it will pop up. Any way to prevent it from popping back up after it has been closed via the “x” button?
that’s what I have it doing, but then as the user continues to type the “onKeyPress” code will start to run and the box will pop up again. So, is there any way that after the box is closed it will stay closed and the keypress code can’t run again for a set amount of time like say 5 seconds?
@anneynorton7
You can try using either:
setTimeout - allows to run a function once after the interval of time.
setInterval - allows to run a function regularly with the interval between the runs.