Tag Archives: jQuery

Prevent Double Submit on Forms with jQuery

The following snippet disables the submit button of all forms in scope of the function after the submit button has been initially clicked. To prevent users from submitting your forms more than once.

How does it work?

When the submit button of the form is clicked, it triggers the form submit function of jquery, then takes the submit handler of the current form and makes it return false so it can’t submit the same form again.

Equal Column Heights with jQuery

The function:

This function loops through each of the elements passed in as parameters and sets each one equal to the tallest element in the group.

Usage:

 

Zebra Stripe a Table or List with jQuery

This snippet lets you strip the even/odd rows of your tables/lists different colors for easier reading:

 

Enable HTML5 Markup on Older Browsers

HTML5 is definitely the future of client-side web development. Unfortunately, some old browsers do not even recognize new tags such as header or section. This code will force old browsers to recognize the new tags introduced by HTML5.

A better solution is to link the .js file to the <head> part of your HTML page:

Source: http://remysharp.com/2009/01/07/html5-enabling-script/