Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(function($) {
- $('form[data-async]').live('submit', function(event) {
- var $form = $(this);
- var $target = $($form.attr('data-target'));
- $.ajax({
- type: $form.attr('method'),
- url: $form.attr('action'),
- data: $form.serialize(),
- success: function(data, status) {
- $target.html(data);
- }
- });
- event.preventDefault();
- });
- });
Add Comment
Please, Sign In to add comment