CHAPTER 8

image

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.