0

I'm using Views Display Tabs module and it works really well. My problem is that I'm using Views exposed filters as a block. When I switch between tabs the filters don't get updated because they are in a block and the module uses js to switch between tabs, so the page doesn't get refreshed. I would like to know a way to disable the js functionality of the module without hacking it. Ideally the module would have a setting for this.

1 Answer 1

1

The standard practice for adding javascript is to use Drupal.behaviors to execute your modules code when appropriate.

This gives an easy way to override modules javascript by redefining that modules behavior. For Views Display Tabs I took a look at their javascript source to see that the behavior was called Drupal.behaviors.viewsDisplayTabs.

So now you can add your own javascript to override this:

//Override Views Display Tabs javascript
Drupal.behaviors.viewsDisplayTabs = function() {}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.