Skip to Content

jQuery: check if a button is active or not

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.

Continue Reading

jQuery: AJAX autocomplete for e-commerce products

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.

Continue Reading

jQuery: AJAX pagination with PHP

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.

Continue Reading