View Single Post
  #2  
Old 03-15-2013, 09:23 AM
A Wee ClicK's Avatar
A Wee ClicK A Wee ClicK is offline
Webpartner
 
Join Date: Aug 2011
Location: UK (Northern Ireland)
Posts: 89
Default Trying To Hide Some Product Options Based On If Radio Button Is Checked

I am trying to hide the radio buttons of certain options when the product page is first loaded and when a particular radio button is clicked, the other options appear.


The test page I have is at http://farmboutique.com/shop-online/...32&id=21349373

I am a beginner in using jquery and not quite sure how to combine the productId value into the jquery statement.

The jquery code I have formulated is:

Quote:
<script>
Ecwid.OnPageLoad.add(function(page) {
if (page.type == "PRODUCT") {

$('input:radio[name=productId+"-Do You Require An Embroidered Logo"]').click(function() {
var $this = $(this);
if ( $this.val() == "on" ) {
$this.nextAll("#ecwid-productoption-"+productId+"-If_you_require_a_logo_to_be_embroidered:002c_has_t his_already_been_set_up_by_us-container").show();
} else {
$this.nextAll("#ecwid-productoption-"+productId+"-If_you_require_a_logo_to_be_embroidered:002c_has_t his_already_been_set_up_by_us-container").hide();
}
});

}
});
</script>
I know I am nearly there with this - any help and guidance would be most appreciated.

Thanks

Andrew
__________________
Andrew

---------------------------------------------
UtterApparel.com
ASLCreative.com
Zingaboo.com