Please see this: http://jsfiddle.net/uNbYu/1/
If you click submit, the button doesn’t do anything, but simply hides the text box and only works the second time.
How can I find a way to fix this problem without removing the .hide() in the JS?? As I really need that.
Thanks
EDIT: The text box should be made hidden when the text input is clicked out of
The reason the button doesn’t seem to do anything the first time you click it is because you aren’t actually clicking it. The blur event on the input field fires first, causing the field to disappear. The result is that your click does not actually land on the button!
See this updated fiddle: http://jsfiddle.net/uNbYu/10/
In this example, I’m binding the hiding of the input field to the click of the submit button.
I’m not sure if this fully solves your problem. I’m not 100% sure of what you’re trying to achieve, but hopefully this helps.