checkbox, select related div
by Akram kamal
HTML
<h1>Single or Recurring Choice</h1>
<div id="payment_type"> <strong>Please select a payment type:</strong>
<input class="option" type="radio" name="group1" value="single" checked="checked" />Single
<input class="option" type="radio" name="group1" value="recurring" />Recurring
<input class="option" type="radio" name="group1" value="contact" />Contact Us</div>
<div>
<div id="single">single information goes here</div>
<div id="recurring">recurring information goes here</div>
<div id="contact">contact information goes here</div>
</div>
JavaScript
jQuery(function ($) {
$('[name="group1"]').change(function () {
$("#" + $(this).val()).show("slow").siblings().hide("slow")
}).filter(":not(:checked)").each(function () {
$("#" + $(this).val()).hide()
})
})