Skip to content

Instantly share code, notes, and snippets.

@wesruv wesruv/script.js
Created May 13, 2017

Embed
What would you like to do?
Drupal 7 JS File Starter
/**
* @file
* A JavaScript file that does stuff.
*/
// JavaScript should be made compatible with libraries other than jQuery by
// wrapping it with an "anonymous closure". See:
// - https://drupal.org/node/1446420
// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
(function ($) {
'use strict';
Drupal.behaviors.componentName = {
attach: function (context) {
}
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.