Added .ajax class to the auto Ajaxing of forms.

* Forcing every form to be Ajax was proving problematic, so now to define a form as an ajax form it must include the .ajax class.

 * Wondering if .pickles-ajax would be a better choice as it's less likely to collide with someone's existing naming conventions.
This commit is contained in:
Josh Sherman 2010-03-21 00:10:33 -04:00
parent a77acc5c04
commit ecff6637fa

View file

@ -1,7 +1,7 @@
$(document).ready(function()
{
// Catches forms being submitted
$('form input[type=submit]').click(function()
$('form.ajax input[type=submit]').click(function()
{
// Grabs the form
var form = $(this).parents('form').get();
@ -85,7 +85,7 @@ $(document).ready(function()
});
// Forces forms to return false on submit
$('form').submit(function(){ return false; });
$('form.ajax').submit(function(){ return false; });
// Automatically applies zebra stripes to tables
$('table tr:even td').addClass('even');