Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi all,
I'm grouping some fields with horizontal tabs and all works fine, but now I want to disable javascript that creates tabs on mobile devices, so all these tabs will shows simply one under the other.
Suppose I already have my javascript sniffer that returns if the device is a mobile or not (or if its screen is under certain widths) what is the js code that blocks jquery "tabifing" operations on page load?
Thank you very much for any help
Comments
Comment #1
nils.destoop CreditAttribution: nils.destoop commentedThe only way is overwriting Drupal.behaviors.horizontalTabs (field_group/horizontal-tabs/horizontal-tabs.js) in an own javascript file. You can add the checks for mobile in the attach behavior.