I searched a lot of similiar questions on stackoverflow but to no avail of my solution..
I successfully implemented a code with your help guys and i thank you all for your help.. now i require to learn ho to animate the hiding of the divs..
I have some divs which are shown on the loading of the page.. now those divs are based on values of some radio buttons.. on clicking one button there is a particular div now i have two problems.
here is the fiddle http://jsfiddle.net/qudT2/
jQuery code:
$(document).ready(function() {
$("input[name$='type']").click(function() {
var test = $(this).val();
$("div.imgDisp").hide();
$("#" + test).show();
});
});
$(document).ready(function() {
$("div.imgDisp").hide();
$('[id="' + $(":radio:checked").val()+'"]').show();
$(":radio").click(function() {
$("div.imgDisp").fadeOut('slow');
$('[id="' + $(this).val()+'"]').fadeIn('slow');
});
});
for DEMO
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.