On single-page apps it’s very important to keep track of user’s actions especially if the current page won’t be reloaded often (this usually happens on AJAX-driven apps). Suppose that we have a series of buttons and we want to mark a button as inactive after a given period of time. This can be easily achieved with jQuery.
A couple of days ago I found an interesting feature on an e-commerce site: by pasting or typing the product’s code into a text field you could see instantly the name of the product and its price. Interesting. Let’s build our implementation of this feature.
AJAX pagination is made up of two components: a server-side script that processes the AJAX requests on each link and the client-side code that actually send the requests. In this tutorial we’re going to use PHP for the server-side part and jQuery for making AJAX requests. The choice of PHP and jQuery is irrelevant for our purposes: the important thing here is to understand how pagination works.