Problem solved! My jQuery function was in a custom PHP file inside of Joomla. Joomla uses mootools. I had to use jQuery.noConflict for my code to play nice with mootools. Hope this help someone else.
Tony, thanks for responding but i am not sure what you mean by “return false when Enter key is pressed”. I apologize i am not very experienced at this.