I have a jquery function that happens on focus for all inputs with a given class. It works great except when its applied, it applys to all inputs with that class. How can I apply the function only to the one that triggered the action?
Please see my JSFiddle
(when date is clicked, all of them clear. Also if you have entered 1, the other does not return to the default hint)
Many thanks in advance for help.
use
$(this)Working sample : http://jsfiddle.net/sv9uZ/3/ ( I fixed the other code to use chaining also)
EDIT : To Avoid Calling
$(this)everytime ( since we use more than once), We can store that to a local variable and use that. Thanks Mathletics for bring it up.