Uncaught TypeError: $(...).once is not a function

Created on 6 December 2023, 7 months ago
Updated 17 June 2024, 10 days ago

Headroom stopped working after update to Drupal 10. I get the browser error:
Uncaught TypeError: $(...).once is not a function

"once" is at line 13 of headroom.drupal.js

Drupal.behaviors.headroomjs = {
    attach: function (context, settings) {
      if (typeof drupalSettings.headroomjs !== 'undefined' && $(drupalSettings.headroomjs.selector).length !== 0) {
        $(drupalSettings.headroomjs.selector).once('init').headroom({...

Seems to be same problem on dev branch as well.

🐛 Bug report
Status

Fixed

Component

Code

Created by

🇪🇸Spain jonodunnett

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024