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
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
Worked perfectly! Thank you.