Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1462629

    Hello Enfold Team,

    I would like to hide empty table cells on mobile devices. Can you please point me in the right direction for this?

    Thank you for your help.

    -James

    #1462645

    Hey James,

    Thank you for the inquiry.

    You can try this script in the functions.php file:

    function ava_custom_script_here()
    {
        ?>
        <script>
            (function ($)
            {
                function hideEmptyDescCols()
                {
                    if ($(window).width() <= 768) {
                        $('.avia-desc-col').each(function() {
                            if ($(this).is(':empty')) {
                                $(this).hide();
                            }
                        });
                    } 
                }
    
                $(document).ready(function ()
                {
                    hideEmptyDescCols();
                    $(window).resize(hideEmptyDescCols);
                });
            })(jQuery);
        </script>
        <?php
    }
    add_action('wp_footer', 'ava_custom_script_here');
    

    Best regards,
    Ismael

    #1462798

    Worked perfectly! Thank you.

    #1462813

    Hi,

    Great! Glad to know that the script is working. Please let us know if you have more questions about the theme.

    Have a nice day.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hide Empty Table Cells on Mobile’ is closed to new replies.