Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

0

Create custom hook_theme twig file for adding CSS and JS function mymodule_theme() { return [ 'css' => [ 'render element' => 'children', 'variables' => array( 'cssdata' => NULL, ), ], 'js' => [ 'render element' => 'children', 'variables' ...


0

You can use Seeds Toolbar for Drupal 8. https://www.drupal.org/project/seeds_toolbar


0

Since, you've built everything in js, next thing to do is send the data from the client. You could do that with an endpoint in a custom module and sending everything you want there with ajax. From there it depends how often you anticipate db writes from these data and you can assess the next step to take. You could: Create a content type and ...


2

If Ajax reloads this part you are hiding, the marker once() has set is overwritten, also the show/hide status. Then you need a different approach, either submit the show/hide status, so that it can be returned by Ajax, or create a show/hide Ajax form element to have full control over it through Ajax. If this is outside of the Ajax wrapper you can do this in ...


0

In order to make this work properly as well as in IE, I had to trigger a function onChange rather than calling it in the closure directly. $('#edit-emp-lname').change(function() { doChange(); }).attr("onchange", function() { doChange(); }).blur( function() { doChange(); }); function doChange() { var empName = $('#edit-emp-lname').val(); var empArray ...


0

There are a couple of ways in Drupal 7 to control load/execution order. The simplest is to change the module weight in the system table to get the right order. Unfortunately, this will not work in this case since there is a module and theme involved. Themes always get executed after modules (so UI changes are ensured to happen and not be overwritten). ...


2

I just came across this post while working something out in our project. We have multiple events bound to $('body', context) since flexibility in the platform allows for widgets and such to be placed almost anywhere within the body. Using $('body', context).on('click', '.modal-trigger', function (e) {}); was causing the click event to be bound on body 2x. ...


Top 50 recent answers are included