I have a little php experience and would like to learn ajax jQuery. I've been watching several tutorials on submitting a form without refreshing the page. I notice people use different ways to prevent a form from submitting the normal way (with a page refresh):
- with the event.preventDefault() function
- using return false
In a script I'm trying to understand the JS script starts with:
$("#submitBrandForm").unbind('submit').bind('submit', function() {
Does this also have the same functionality? This same script ends with 'return false', which confuses me (and makes me think the unbind - bind code has another purpose).
Thanks