Skip to main content

Questions tagged [javascript]

Use for questions about JavaScript code that is very specific to Drupal.

Filter by
Sorted by
Tagged with
1 vote
1 answer
80 views

I am trying to understand and use Javascript a bit more in Drupal Webform. I have managed to create some simple javascript to prove that I can create a module, load a library correctly and get a ...
ChumKui's user avatar
  • 199
0 votes
1 answer
102 views

I have installed the Storybook module, which converts .stories.twig files into .stories.json files. I have the following lines added to the package.json file. "@storybook/addon-a11y": "^...
Pedro's user avatar
  • 144
0 votes
1 answer
79 views

What version of jQuery uses the drupal 10.3.9 by default?
Neo's user avatar
  • 13
0 votes
1 answer
66 views

Migrated website from 7 to 10, but the jQuery scripts do not work anymore. Code: (function ($, Drupal, window, document, undefined) { Drupal.behaviors.myLinebreak = { attach: function (context, ...
user3108268's user avatar
0 votes
1 answer
140 views

We are encountering an issue where we want to download packages from JFrog Artifactory instead of the internet. We are able to route the composer root and dependent packages from JFrog Artifactory; ...
Ankit Mittal's user avatar
0 votes
1 answer
52 views

Issue I have a Drupal 10 site that doesn't load some dependencies for Anonymous users and breaks the blur effect for one of my modules. I used the Background Image module to create a page with a ...
GeorgeCiesinski's user avatar
0 votes
1 answer
120 views

I have a paragraph content builder that has a countdown element. Moreover, this element, like other types of paragraphs, can be added an unlimited number of times. This means that the script must be ...
Владимир Помелов's user avatar
-4 votes
1 answer
227 views

In a Drupal 10 site I have a page (content type: Basic page) that needs a small Javascript fragment defined in a Javascript file that was added as an asset to the theme.libraries.yml file. I don't ...
quilx's user avatar
  • 31
0 votes
1 answer
67 views

How can i override jquery_ui_accordion? I can't figure out how. libraries-override: # Does not work? jquery_ui_accordion/accordion: css: component: assets/vendor/...
mgoubert's user avatar
  • 378
2 votes
0 answers
76 views

Lately working with svelte in a project. The generated HTML uses Javascript with link and modulepreload: <!doctype html> <html> <head> ... <link rel="modulepreload&...
Koala Yeung's user avatar
-1 votes
1 answer
104 views

I'd like to give all users including anonymous ones the option to add nodes of certain content types to a list like "interested", several times. The logic is identical to that of a shopping ...
alesios's user avatar
  • 41
2 votes
2 answers
980 views

I am using Drupal 10, CKEditor5, and a text format that has a good number of options in the toolbar including the source editing plugin. I have a custom module that defines a custom permission that I ...
Jordan's user avatar
  • 49
0 votes
1 answer
98 views

I'm trying to figure out how to respond to dialog:afterclose only once, and I'm not having any luck getting the syntax right (and I'm having trouble finding resources because most search results refer ...
Noah's user avatar
  • 1
0 votes
1 answer
137 views

I have checked the field_ui core module to understand how to update my code, but it doesn't seems to work. This is the code. (function ($, Drupal, drupalSettings) { Drupal.behaviors....
Oskar Calvo's user avatar
0 votes
0 answers
122 views

I have visible states setup for a 2 fields that correctly work when javascript aggregation is disabled. When I turn JS aggregation on both fields are visible no matter what option I select on the ...
blu's user avatar
  • 478
0 votes
1 answer
250 views

drupal_add_js('path_to_external_JS_file_on_CDN', [ 'every_page' => TRUE, 'type' => 'external', 'defer' => 'defer', 'attributes' => [ 'async' => true, 'type' =...
monster_energy's user avatar
0 votes
0 answers
143 views

We have drupal version 9.5.7 in our website, When we had upgrade ckeditor4 to ckeditor5 then Select media popup(for image and video) is not opening. Console error: ajax.js?v=9.5.7:411 An error ...
Jasbir's user avatar
  • 101
0 votes
0 answers
71 views

I have a website that was set up using Webforms with page breaks. So on the same URL, there are multiple "pages" and div blocks on each page, with a progress bar on top so you know what &...
Rachel C's user avatar
1 vote
1 answer
393 views

On a node/add form I have a pair of fields that need to be able to control one another. The first field allows a user to enter a birthdate, the second field allows the user to say the birthdate is ...
Drupal Learner's user avatar
0 votes
0 answers
146 views

I discovered today that the Views UI is broken on one my sites. I'm not sure when it broke, because the Views UI is not one of the things I check after updates. I'm currently at 9.5.3. My Views UI ...
Menno van den Heuvel's user avatar
0 votes
1 answer
399 views

How can an external JS library be integrated into Drupal for use within a custom Ckeditor4 plugin? My custom plugin needs to set a javascript cookie each time I click on the plugin icon and unset when ...
sisko's user avatar
  • 1,730
0 votes
1 answer
76 views

My older site uses bootstrap 3 and has been working great when accessed from a mobile phone and the hamburger menu kicks in, but something has happened in jQuery 3.6.2 (In Drupal 9.5.0) that causes ...
Mr.C's user avatar
  • 1
1 vote
1 answer
138 views

We have a Drupal installation that acts as a backend and a front end that uses the HttpClientModule from Angular to query this data. Thanks to the typescript base, we can provide the functions of this ...
flauschi's user avatar
0 votes
3 answers
2k views

I've created this javascript (delivery.js) that is supposed to take a pre-existing div on a webform page and append a Google Map to it, along with a few circles of differing radius. Here is my ...
Riley Lutz's user avatar
-2 votes
2 answers
837 views

I have followed the official documentation, but it doesn't work global-styling: version: VERSION js: js/bootstrap.min.js: {} js/custom.js: {} css: component: css/style.css:...
user31782's user avatar

1
2 3 4 5
65