Javascript Text Script Snippets


Detect Javascript On/Off, With Notification: If JavaScript is on the user gets a welcome message. If off, the user is instructed to turn it on.

13 November, 2012   

Creating and maintaining an effective JavaScript toolbox can greatly reduce development time. This script will show you how to include specific snippet modules on individual pages.

29 January, 2011   

Cufon 101

04 July, 2012   

Good programmer comments their code so that anyone can know what is happening in code. Its easy for others to edit the code.

29 April, 2015   

Advanced "Go to Top" link using JavaScript and HTML anchors

16 June, 2012   

You can use JavaScript window.location to redirect a visitor to a required page. You may have seen this feature used by sites with full page ads, or to redirect visitors to the site's new domain name. You can add also a timer to the script that will allow the page to redirect and the visitors will not need to click a link or type in the new URL.

Confirm a deletion (or any action) with Javascript.

26 November, 2011   

In jQuery $ is an alias for jQuery, so you can use jQuery() for accessing the jQuery methods. The following code example shows how you can use other libraries with jQuery:

11 February, 2012   

JavaScript Code to show a message box or a alert window when page opens

22 August, 2012   

This JavaScript code within your web page HTML between your HEAD tags

13 October, 2012   

Code example to show current date and time

31 December, 2014   

Function that allows a Javascript cookie to be set after HTML has been output to the page.

20 December, 2011   

The example below defines a loop that starts with i=0. The loop will continue to run as long as i is less than, or equal to 5. i will increase by 1 each time the loop runs.

20 December, 2011   

The example below defines a loop that starts with i=0. The loop will continue to run as long as i is less than, or equal to 5. i will increase by 1 each time the loop runs:

A javaScript loop example with Do While loop

05 February, 2014   

We created a slide show that allowed the user to move through an array of images.

27 August, 2012   

HTML code for Top & Bottom Halves Layout

05 February, 2011   

Link to CSS files: You essentially hotlink directly to CSS files on Google. Through URL parameters, you specificity which fonts you want, and what variations of those fonts.

17 November, 2012   

Little bit of javascript which will automatically break out of frames

08 March, 2012   

A javaScript loop example with Break a loop