Last active
May 10, 2019 13:03
-
-
Save ScarletPonytail/c826aefcf4c31ba55d1823d5dfd8084c to your computer and use it in GitHub Desktop.
JS and jQuery - Starter file
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
(function ($, Drupal) { | |
$('body').addClass('loaded'); | |
$('footer').addClass('footer'); | |
})(jQuery, Drupal); |
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
/* | |
* 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