Adding JavaScript to Your Drupal Module

In this chapter you will once again be adding to the hello_world module you created earlier. This time you add some basic JavaScript to the simple page you programmatically created in Drupal. You’ll be using the basic JavaScript skills you just learned in Chapter 7. Being able to add JavaScript to your Drupal module will mean you’ll be able to add click events, hover events, and all the other JavaScript goodness to make your pages dynamic and user friendly without needing to reload the page unnecessarily to get more information for your users (reloading the page takes about two to four seconds ...

Get Drupal 8 for Absolute Beginners now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.