Banner

Drupak Drupal Career Development Program

DOM Manipulation & Events

This video, Day of the JavaScript course in DDCDP, focuses on DOM manipulation, event handling, and practical project implementation. Below is a summary of the topics covered:

Creating and Managing Elements

  • Dynamic HTML Creation: Explores using template literals and assigning them to innerHTML.
  • Working with Data: Demonstrates creating an array of objects, using map() and join() to construct dynamic HTML, and utilizing insertAdjacentHTML() to inject elements into the page.
  • Attributes: Covers getting, setting, and checking HTML attributes, including a shorter syntax for conditional logic and using the dataset API for data attributes.

Events, Bubbling, and Capturing

  • Event Listeners: Introduces adding event listeners to buttons and the document object.
  • Event Object (e): Explains how to use the event object to access target elements, coordinates (clientX, clientY), and trigger specific actions based on user interaction.
  • Bubbling vs. Capturing: Discusses the flow of events in the DOM. Bubbling moves from the target element up to the root, while Capturing moves from the root down to the target. It also covers stopPropagation() to control event flow.

Functional Slider Project

  • Markup and Styling: Sets up the structure for a review slider using flexbox, positioning, and SVG icons.
  • JavaScript Functionality: Implements the logic to handle 'Next' and 'Previous' navigation, dynamically adding and removing classes (such as active, next, and previous) to manage slide transitions and visibility.

Course Content

WHY CHOOSE US AS YOUR DRUPAL PARTNER?

We combine strong technical skills, business insight and hands-on Drupal AI experience in every project. With over 100 projects delivered since 2012, an Acquia-certified team and clear, honest communication, we turn complex technology into a real advantage for your business.

consultation image