Javascript Function Snippets


19 November, 2014   

Enable a link after a set period of time.

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

20 August, 2014   

Javascript function to check or uncheck all the checkboxes in a form.

JavaScript Code example to highlight an Image on Mouseover

14 February, 2017   

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

This example code showing how to use PHP Functions to clean User Input

10 June, 2013   

A function that returns an array of elements based on DOM element, tag, and class name. For instance, getElementsByClassName(document, 'tr', 'info') will return an array of all "tr" tags under the document node having the "info" class.

An example of Strict Textmate Template

10 August, 2011   

Url Encode is a technique employed in order to convert a string used in a URL into a valid URL forma and decode url

25 March, 2012   

JavaScript Codes to show alert box on mouse over

12 January, 2011   

Browsers already have "back" buttons, so you'd better have a darn good reason for needing to put one on your page! This is totally obtrusive, but you could fix that by only appending this button through JavaScript.

08 October, 2014   

JavaScript code to detect browser and OS.

02 August, 2014   

JavaScript code to detects browser and OS

17 November, 2012   

JavaScript code example for converting a string to all upper or lowercase

Completely different version of populating a drop-down from an array. Can be simple or complex depending on the parameters. Supports JavaScript and auto-selection.

09 June, 2014   

JavaScript code for click to edit a table cell inline.

28 June, 2016   

JavaScript code example for Parse Zapier apps list

25 April, 2011   

HTML5 starting point template. Used in conjunction with HTML5 CSS reset at the above link.

23 May, 2018   

Add to bookmarks bar, select text, click it to get the word count.

13 October, 2012   

You need to give each element a sequentially numbered tab index value in order for this script to work properly.