I want to trigger an event with jQuery when an input is focused. Should be simple enough.
According to this article a simple $('#id').is(':focus')
inside an if statement should work. But not for me: http://jsfiddle.net/PaulvdDool/BdG9N/
I've also tried to use .focus
here but that just triggers the event constantly. I could make it work, but I reckon it's not the best way of doing it.
Can somebody show me the light?