Questions tagged [drupal-behaviors]

This tag refers to the Drupal JavaScript system used for managing events on content.

refers to the Drupal JavaScript system used for managing events on content.

Resources

13 questions
1
vote
1 answer

How to detect Drupal (8) views ajax call start (with JS only)

I'm trying to do some custom UI tweaks while a view is being reloaded with ajax. I can find ways to trigger events when the ajaxcall is complete but I can't seem to find something similar for when the ajaxcall is started. The view gets updated with…
1
vote
0 answers

jquery prev issues when working with a dropdown list

This is my first question in here, so any direction for making a better ask is appreciated, and of course any help even more so. :-) I am working with Drupal behaviors and jquery to setup navigation for a long form. (Form is created using…
1
vote
0 answers

Drupal 7 behaviors don't work

I'm having a problem where Drupal behaviors seem to work with logged in users, but not everyone else, except when the behavior is executing a submit(). For example this won't work. Drupal.behaviors.login_activate = { attach: function (context,…
RJ Johns
  • 47
  • 7
1
vote
1 answer

Drupal 7: Drupal.behaviors isn't running

I've got a custom module I'm creating called touchpoints. At the top of the touchpoints.module file I have the following: global $base_path; $my_settings = array( 'basepath' => $base_path, 'module_path' =>…
LoneWolfPR
  • 3,978
  • 12
  • 48
  • 84
0
votes
0 answers

Why did jquery code stop working after adding once() and each() to Drupal behavior?

There was a problem with the fact that part of the js code worked several times, so I added once() and each() (see comments): (function($, Drupal) { Drupal.behaviors.collapsedPricing = { attach: function attach(context) { $(".pricing…
ewik
  • 43
  • 5
0
votes
2 answers

How to write javascript on Drupal with drupal.behaviours

I have a grid that contains two rows and three columns. Each column has a picture, a title, and a subtitle. All the pictures have the same class, let's say "image".I want the picture to change during hover. I have a div with the other image (the one…
sstavridis
  • 21
  • 9
0
votes
1 answer

Trigger calls infinite times in Drupal behaviors

I want to remove all the options except only one in the select box and trigger the onchange based on this last option. I see the trigger calls infinite times. Below is my codes: