Drupal.behave
Component type
Categories
Maintenance status
Development status
Downloads
Component created
Component changed
Super sexy Drupal JS behaviors.
API in a nutshell
Drupal.behave(...)
It's a super simple, jQuery like, chainable API.
Before: The Conventional Drupal 7 Way
(function ($) { Drupal.behaviors.exampleModule = { attach: function (context, settings) { $('.myDOM', context).text('Who throws a shoe?!?'); } }; })(jQuery);
After: Yeah, Baby Way!
jQuery is also passed in as the third argument. Yeah, baby!
