Hi there, I'm looking for a way to wrap a DIV around several attributes as I want to create a button that will open and close a div with extra options inside it on my product page. Normally the DIV would be hidden until someone clicks a button. There will be attributes outside the closed DIV and also inside the closed DIV.
So you would have something like this:
Print Options (FIRST SET OF ATTRIBUTE OPTIONS):
Full Colour Single Sided
Full colour black & white reverse
Full colour both sides
<a href="OPENDIVBUTTON">Open</a>
<div id="MYHIDDENATTRIBUTESDIV">Finishing Options: Option 1, Option 2, Option 3</div>
Upload (LAST ATTRIBUTE OPTION)
I came across some code which says it targets an attribute name but I am unsure how to use it. This would enable me to start a div before an attribute name and end it where I wanted.
This is the code:
<?php if (stristr($attributes_values->fields['products_options_name'],'MYFIRSTATTRIBUTENAME')) { ?><div id="MYHIDDENATTRIBUTESDIV"><?php } ?>
<?php if (stristr($attributes_values->fields['products_options_name'],'MYLASTATTRIBUTENAME')) { ?></div><?php } ?>


Reply With Quote
