Find on this demo page all the jQuery code examples from our article. Try them all, the script doesn't record or submit any data.

Simple photo gallery with thumbnails

Click each thumbnail to switch the bigger image.

big view
thumb 1 thumb 2 thumb 3

Populate a SELECT menu

Choose a color and a second SELECT menu with the available sizes.

Show/hide HTML elements based on a selection

Switch the payment options and get for the creditcard option a list of available cards.

Disable/enable the form submit button

Check/uncheck the check box element to enable or disable the submit button.

Count clicks for Google Analytics

For both links, clicks are counted within the Google Analytics web statistics software. Normally you need to add extra code to each link, but for this example, only single function is used.

The style used on this demo page is not part of the example files download. You need to use Bootstrap if you like to format the code examples like on this page.

DigitalOceanSSD Cloud Server from $5/monthSimple cloud hosting, built for developers. Signup here and receive $10 in credits!
WebfactionShared hosting for developersFlexible hosting without having to maintain your own cloud servers. Start your free trial »