Created
August 23, 2014 14:52
-
-
Save joshcoast/6aaedb24fa25ac9efa5c to your computer and use it in GitHub Desktop.
So, what's the Drupal.behaviors doing?
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.addActiveClassToParentMenuIfSubnavPresent = { | |
attach: function (context, settings) { | |
$("#block-menu-block-1").each(function(){$("a[href='/products-equipment']").addClass("active").parent().addClass("active");}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This might be a dumb question, but I've been seeing this quite a bit in new Drupal sites javascript, and I can't figure out what it is. In this code snippit, what's the "Drupal.behaviors" doing?