Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type='text/javascript'>
- //<![CDATA[
- $(window).load(function(){
- $("#parent2, #parent3").css("display","none");
- $(".aboveage2").click(function(){
- if ($('input[name=age2]:checked').val() == "Yes"){
- $("#parent3").slideUp("fast"); // HIDE
- $("#parent2").slideUp("fast"); // HIDE
- $.cookie('showTop', 'collapsed'); //Add cookie 'ShowTop'
- }
- if ($('input[name=age2]:checked').val() == "No") {
- $("#parent2").slideDown("fast"); // SHOW
- $("#parent3").slideUp("fast"); // HIDE
- $.cookie('showTop', 'expanded'); //Add cookie 'ShowTop'
- }
- if ($('input[name=age2]:checked').val() == "Maybe") {
- $("#parent3").slideDown("fast"); // SHOW
- $("#parent2").slideUp("fast"); // HIDE
- $.cookie('showTop', 'expanded3'); //Add cookie 'ShowTop'
- }
- });
- var showTop = $.cookie('showTop');
- if (showTop == 'expanded') {
- $("#parent2").show("fast");
- $('input[name=age2]:checked');
- } else {
- $("#parent2").hide("fast");
- $('input[name=age2]:checked');
- }
- if (showTop == 'expanded3') {
- $("#parent2").hide("fast");
- $("#parent3").show("fast");
- $('input[name=age2]:checked');
- }
- });
- //]]>
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement