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:
parent
a77acc5c04
commit
ecff6637fa
1 changed files with 2 additions and 2 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue