View Single Post
  #5  
Old 04-17-2012, 04:27 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: Show additional fields at customer checkout only if a checked box is checked

We did something like this by adding an onclick to the checkbox which points to a function like this:
Code:
function toggleOtherFields(c) { if (c.checked) { $("#otherField1").show("fast") $("#otherField2").show("fast") } else { $("#otherField1").hide("fast") $("#otherField2").hide("fast") } }
The onclick would be like this:
Code:
onclick="toggleOtherFields(this)"
Add the appropriate ids to each element to hide/show and match the names with those set in the function.
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote