Created
August 12, 2015 09:52
-
-
Save mohamedrez/2b9f31128c270e12c46d to your computer and use it in GitHub Desktop.
drupal 7 custom javascript js
This file contains 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
/** | |
* @file | |
* main.js | |
* | |
* Provides general enhancements and js functionalities. | |
*/ | |
var Drupal = Drupal || {}; | |
(function ($,Drupal) { | |
Drupal.behaviors.exampleModule = { | |
attach: function (context, settings) { | |
$('.example', context).click(function () { | |
$(this).next('ul').toggle('show'); | |
}); | |
} | |
}; | |
})(jQuery,Drupal); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment