JQuery ‘exists’ and ‘checked’ functionality
One of the brilliant things about jquery is that it’s so easy to extend, whether that be by writing your own full blown plugin, or with a quick 1 liner to add new functionality. Here’s a couple that I always find handy. First up, adding an ‘exists’ function, so you can do this: if ($(selector).exists()){ […]