I’ve been searching forever to find a solution, but can’t find anything. I’m still new to JS. Here is what I have so far – http://jsfiddle.net/WarrenBee/GLb4u/
I want my form to replace the typed text in the input area with a success/fail message, similar to the form on this website: http://momentskis.com/#cols
I don’t want a page reload or a pop-up message.
Any ideas?
All you need to do is, to put your event handler code into document.ready
The reason for that: When your javascript runs, the DOM is not finished loading, and all jquery selectors return empty.
You need to call your JS after DOM is finished, and
$(function(){});makes it so.Here is working fiddle:
http://jsfiddle.net/GLb4u/5/