Empty Space element on WPBakery breaks on mobile

386 Views Asked by At

I have various empty space boxes on a page I am building and they work until on mobile view, only when the page is refreshed in mobile view though, not if one just resizes the window to tiny.

On desktop the html appears like this:

<div data-original-height="560" class="vc_empty_space" style="height: 560px;" 560px&quot;="">
<span class="vc_empty_space_inner"></span></div>

Refreshed on mobile view:

<div data-original-height="560" class="vc_empty_space" style="&quot;height:" 560px&quot;="">
<span class="vc_empty_space_inner"></span></div>

Its the same on all my pages.

1

There are 1 best solutions below

0
On

I used this as a quick fix if anyone has the same issue:

jQuery('.vc_empty_space').each(function() {

 var heightspace = jQuery(this).attr('data-original-height');
 jQuery(this).css('height', heightspace);
});