1.2 Identify Javascript and jQuery programming concepts
Review jQuery api docs. Review Drupal.behaviors.
jQuery is no longer automatically enabled with Drupal 8 you must specify that you want jQuery and what version you wish to use.
https://www.drupal.org/docs/8/api/javascript-api/javascript-api-overview
Review the jQuery Api docs for examples of jQuery methods.
For Example:
The jQuery method .filter() reduces the set of matched elements to those that match the selector or pass the function's test. Consider a page with a simple list on it:
We can apply this method to the set of list items:
OR
Another jQuery method example would be slidetoggle. Display or hide the matched elements with a sliding motion.
Other Resources
Last updated