Curious if anyone knows what the difference is in regards to the data parameter.
I have a $.post method that takes a $('#myform').serialize() as my data param and works.
If I try the same using the $.ajax() approach, it doesn’t work as my data param doesn’t appear correct.
Does anyone know the difference and what I might use instead of the above .serialize?
After re-reading some online documentation, I decided to stick with $.post over $.ajax.
The $.ajax method’s data param does something different than the $.post method does, not sure what exactly, but there is a difference.
The only reason I wanted to use $.ajax is because I wanted to be able to handle events and didn’t realize I could do so with $.post.
Here is what I ended up with
JQuery 3.x
https://api.jquery.com/jquery.post/