Created
October 18, 2013 23:23
-
-
Save bratsun/7049695 to your computer and use it in GitHub Desktop.
AJAX callbacks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Drupal.behaviors.AjaxChecker = { | |
attach: function(context, settings) { | |
$('#views-exposed-form-prods-page').ajaxComplete(function(event, xhr, settings) { | |
$('.loader').hide(0); | |
}); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.webform-client-form').each(function() { | |
var t = $(this); | |
var id = '#' + t.attr('id'); | |
Drupal.behaviors.webform_ajax = { | |
attach: function (context, settings) { | |
jQuery(id, context).once('webform_ajax', function () { | |
var top = $('.node-webform').offset().top - 10; | |
$('html, body').animate({ | |
scrollTop: top | |
}, 500, 'easeOutQuart'); | |
}); | |
} | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment