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

Created on 6 December 2023, about 1 year ago
Updated 17 June 2024, 6 months 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.71.5 2024