Hi all i am working on jquery here i have three three radio buttons and i have three div for each selection i need to select
one dive like i had providing separate div for it when i selected the div it wil open right ok i need to perform like when
i selected the other radio button the other one which opened first should close and selected should open how could i do this
this is my code follows please help me to do this
<form class="form-horizontal" id="zone">
<label class="control-label" for="Availability">Shipping Zone Type</label>
<div class="controls">
<label class="radio">
<input type="radio" class="regular-radio" name="radio-1-set" id="radio-1-1"><label for="radio-1-1"></label>
This shipping zone is based on one more countries
<span class="tooltip-demo"><a data-original-title="Tooltip on right" href="#" rel="tooltip" data-placement="right"><i class="icon-question-sign"></i> </a></span>
</label>
<div class="selectbox-bg selectbox-bg-sb3 pull-left " id="shippingZone" style="display:none">
<select>
<option>Choose a Country</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
<label class="radio">
<input type="radio" class="regular-radio" name="radio-1-set" id="radio-1-2"><label for="radio-1-2"></label>
This shipping zone is based on one more state or provinces
<span class="tooltip-demo"><a data-original-title="Tooltip on right" href="#" rel="tooltip" data-placement="right"><i class="icon-question-sign"></i> </a></span>
</label>
<div class="selectbox-bg selectbox-bg-sb3 pull-left " id="shippingzonecountry" style="display:none">
<select>
<option>Choose a Country</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
<input type="radio" class="regular-radio" name="radio-1-set" id="radio-1-3"><label for="radio-1-3"></label>
This shipping zone is based on one more postal or ZIP codes
<span class="tooltip-demo"><a data-original-title="Tooltip on right" href="#" rel="tooltip" data-placement="right"><i class="icon-question-sign"></i> </a></span>
</label>
<div class="selectbox-bg selectbox-bg-sb3 pull-left " id="zipcode" style="display:none">
<select>
<option>Choose a Country</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
</form>
in the above i have three radio bttons and three divs i need to select a radio button and it shoul b open
when i select the other the first which is opened it should be close plz help me to this sdtha
thi is my jquery :as fpllows
$(function () {
$("#radio-1-2").click(function () {
$("#shippingzonestate").show('slow');
});
$("#radio-1-2").click(function () {
$("#shippingzonestate").show('slow');
$("#shippingzonecountry").show('slow');
});
$("#radio-1-3").click(function () {
$("#zipcode").show('slow');
$("#Product-Code-SKU").show('slow');
});
i had tried like this but when i opened the other one should close how could i do this
EDIT(Common function)
just use hide method