i am making a simple site in php. I have a product page and there is a link on product page that says add to wishlist so when a user clicks on that link the product is posted to the server and the page is redirected from the backend. but I want to do it using jquery ajax so that my page is not reloaded. can somebody please provide a snippet of code on how to do that ?
Share
The best way to learn jQuery, is to visit the API site. (Which seems to be down at the moment)
The ajax category
Update:
This will catch any click on anchors with the
fooclass under<body>no matter when they were created(“runtime” or with the page load) .