Sha256: 059d077cf4e340fdb69be361902449936fa30cbf3dc2f717f7bd32fd5994b488
Contents?: true
Size: 619 Bytes
Versions: 96
Compression:
Stored size: 619 Bytes
Contents
// Set a form to send via ajax and remove current errors // usage: // ajaxifyForms('#new_subscriber') function ajaxifyForms(selector) { $(selector).live('submit', function() { $(this).find('#errorExplanation, .success').slideUp('fast', function() { $(this).remove();}); $.post($(this).attr('action'), $(this).serialize(), null, 'script' ); return false; }); } // Set a link to get via ajax // usage: // ajaxifyLinks('#tags a') function ajaxifyLinks(selector) { $(selector).live('click', function() { $.get($(this).attr('href'), $(this).serialize(), null, 'script' ); return false; }); }
Version data entries
96 entries across 96 versions & 1 rubygems