Keep Columns Horizontally side by side on Mobile Devices

Please note that this is now available as a plugin for easier installation. While you can use this document as a reference, the recommended method to add…

  • Not yet re-checked
  • Classic builder

Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.

Screenshot for “Keep Columns Horizontally side by side on Mobile Devices”

Step 1

In each column, add the CSS class of "small-screen-column."

Screenshot for “Keep Columns Horizontally side by side on Mobile Devices”

Step 2

Get the component ID by hovering over the info icon.

Screenshot for “Keep Columns Horizontally side by side on Mobile Devices”

Step 3

Add the following code to the JavaScript tab of the page.

Text
TB.render('component_ID', function(data) {
    data.ele.find('.small-screen-column').parent().parent().each(function() {
        var classList = this.className.split(/\s+/);
        for (var i = 0; i < classList.length; i++) {
            if (classList[i].contains('col-md')) {
                $(this).addClass(classList[i].replace('md', 'xs'));
            }
        }
    });
});
Screenshot for “Keep Columns Horizontally side by side on Mobile Devices”

Original Community Post:

Keep columns horizontally side by side on Mobile devices - Community Discussions / Tips and Tricks - Tadabase Community

Was this page helpful?

Something wrong or missing on this page? Tell us.