Skip to content

Instantly share code, notes, and snippets.

@tanmayk
Created April 4, 2013 14:26
Show Gist options
  • Save tanmayk/5310784 to your computer and use it in GitHub Desktop.
Save tanmayk/5310784 to your computer and use it in GitHub Desktop.
(function($) {
Drupal.attachBehaviors = function (context, settings) {
context = context || document;
settings = settings || Drupal.settings;
// Execute all of Drupal behaviours.
jQuery.each(Drupal.behaviors, function () {
if (jQuery.isFunction(this.attach)) {
this.attach(context, settings);
}
});
// Write last code here.
// Also complete parathesis. :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment