Skip to content

Instantly share code, notes, and snippets.

@darrenmothersele
Created April 12, 2013 09:21
Show Gist options
  • Save darrenmothersele/5370778 to your computer and use it in GitHub Desktop.
Save darrenmothersele/5370778 to your computer and use it in GitHub Desktop.
JS: Example Drupal Behavior
(function ($) {
Drupal.behaviors.exampleModule = {
attach: function (context, settings) {
$('.example', context).click(function () {
$(this).next('ul').toggle('show');
});
}
};
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment