Skip to content

Instantly share code, notes, and snippets.

@stborchert
Created March 4, 2016 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stborchert/ffbba33d6d3c8bc5e1ca to your computer and use it in GitHub Desktop.
Save stborchert/ffbba33d6d3c8bc5e1ca to your computer and use it in GitHub Desktop.
/**
* @file
* Custom behaviors for "SHS alter".
*/
(function ($, Drupal) {
/**
* Test some features.
*/
Drupal.behaviors.shsalterTest = {
// Default function to attach the behavior.
attach: function (context, settings) {
$('select').change(function (event) {
console.log('.change() fetched');
console.dir(event);
});
$('select').bind('change', function (event) {
console.log('.bind("change") fetched');
console.dir(event);
});
}
}
})(jQuery, Drupal);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment