// Get all elements with the class "jet-form-builder-file-upload__content" 2 var fileUploadContentDivs = document.querySelectorAll('.jet-form-builder-file-upload__content'); 3 4 // Iterate through each div 5 fileUploadContentDivs.forEach(function (div) { 6 // Check if the div has any content 7 if (div.innerHTML.trim() !== '') { 8 // If content exists, display the div 9 div.style.display = 'block'; 10 } else { 11 // If no content, hide the div 12 div.style.display = 'none'; 13 } 14 }); 15
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter