Skip to content

Instantly share code, notes, and snippets.

@ScarletPonytail
Last active May 10, 2019 13:03
Show Gist options
  • Save ScarletPonytail/c826aefcf4c31ba55d1823d5dfd8084c to your computer and use it in GitHub Desktop.
Save ScarletPonytail/c826aefcf4c31ba55d1823d5dfd8084c to your computer and use it in GitHub Desktop.
JS and jQuery - Starter file
(function ($, Drupal) {
$('body').addClass('loaded');
$('footer').addClass('footer');
})(jQuery, Drupal);
/*
* Add body class on page load
*/
jQuery(window).load(function($) {
$('body').addClass('loaded');
} );
jQuery(document).ready(function($) {
// Adds a class to the footer in single declaration
$('footer').addClass('footer');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment