Hello,
I need to hide a section of HTML on the website (the add to cart button and prices) from items that meet certain criteria. I have my javascript working for hiding the prices but I'm having trouble using javascript to hide the <div> tag.
Here's the js I'm using:
&lt;script type = "text/javascript"&gt; var hide = '&lt;%=getCurrentAttribute('item','custitemretailhide')%&gt;' if hide == "True" { document.divhideme.style.display='none' } &lt;/script&gt;I also tried it with a ";"&lt;script type = "text/javascript"&gt; var hide = '&lt;%=getCurrentAttribute('item','custitemretailhide')%&gt;' if hide == "True" { document.divhideme.style.display='none'; } &lt;/script&gt;And my HTML for the div&lt;div id="divhideme"&gt; div contents &lt;/div&gt;
What am I doing wrong here? As far as I can tell it appears to be scripted correctly.Thanks