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…
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…
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,…
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' =>…
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…
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…
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:
d3js (both v4 and also v3) charts in Drupal 7 with having click event attached to one of the svg text element using .attr("class", "ajax_button") and attaching Drupal behavior for that element. Problem is that click event is lost once tree gets…
I have a basic question, but I did not find any satisfying answer yet. I must admit, I did not really understand the concept of behaviours. What I understood is that it is more flexible as jQuery(document).ready because it can be fired multiply…
I had started developing a module in Drupal. I made two form controls: a fieldset and a button. The button calls a javascript function "myphoto_options" when it is click. This function only does an alert function. After executing the called…
I'm adding a class to a field depending on the contents of that field so I can style each field differently depending on the content. Imagine a burger rating from one to ten...I want to replace the rating with an image for one, another image for two…
I'm having trouble implementing an effect on DOM elements being loaded after ajax content has been added to a page. My console.log that prints out the number of items shown in the code below prints out 0, though when I run a…
I'm working on Drupal 7, I have a form constructed like this
function qt_debate_response_form($form, &$form_state, $node_id){
$form['node_id'] = array(
'#type' => 'value',
'#value' => $node_id,
);
$form['response_body'] = array(
'#type'…