jQuery Code Snippets


14 February, 2017   

jQuery doesn't really have an .hasAttr() function. You might assume that it does, but alas, it does not.

This is the whole HTML page with JS/CSS embeded, uses Google Maps API V3

20 August, 2015   

Basic setup code for jQuery, linking to Google APIs for the jQuery library.

jQuery code example to show content based on select option.

08 February, 2014   

How to set/get/delete Cookies

04 January, 2014   

Example shows how to set Interval and set Timeout in jQuery

Code snippet to remove class after delay in jQuery.

How to dynamically update your Snippets

How to add jQuery and Snippet to your HTML document

22 July, 2013   

It can be useful to be able to resize images using jQuery

11 April, 2013   

Pull external HTML code from a file right into your webpage

jQuery example to prevent Anchor Links from Loading

Example shown here how to preload the images with jquery in WordPress.

07 March, 2013   

This simple and handy jQuery filter return a single random item from a selection of items. Credit to Waldek Mastykarz

30 January, 2013   

jQuery code example for animated scroll

30 January, 2013   

JQueryUI Search Auto complete Jump Menu with data from remote URL

26 January, 2013   

Once the keycode of the spacebar is detected, it returns false which disallow the entering of space.

26 January, 2013   

jQuery code example to open link in a new window

09 January, 2013   

Better way to handle Broken Image. Missing images will either just display nothing, or display a [ ? ] style box.

How to calculate distance between Mouse and Element