// removes wholesale products if not wholesaler var wholesaleProducts = document.getElementsByClassName(“wholesale”); if(wholesaleProducts){ for(item in wholesaleProducts){ wholesaleProducts[item].remove(); } }