Skip to content
Snippets Groups Projects
Commit 5cf7aac5 authored by Peter Epp's avatar Peter Epp
Browse files

Update use of once function

Use element passed into the function in foreach instead of trying to access it with "this". That seemed to work for a while, but as of the latest released of Drupal 10 it does not.
parent 8c566a66
No related merge requests found
......@@ -26,8 +26,8 @@
};
once('affixed', '[data-toggle="affix"]', context).forEach(function () {
var ele = $(this),
once('affixed', '[data-toggle="affix"]', context).forEach((element) => {
var ele = $(element),
wrapper = $('<div></div>');
ele.before(wrapper);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment