var str = location.href; var tag = str.split('#')[1]; if(tag == "b1"){ $("#block_4").show(); $('html, body').animate({ scrollTop: $("#block_4").offset().top }, 500); $("#basket_1").show(); } if(tag == "b2"){ $("#block_4").show(); $('html, body').animate({ scrollTop: $("#block_4").offset().top }, 500); $("#basket_2").show(); } if(tag == "b3"){ $("#block_4").show(); $('html, body').animate({ scrollTop: $("#block_4").offset().top }, 500); $("#basket_3").show(); } function status_api(){ $("#form_voting").hide(); $("#form_thanks").show(); //console.log($value); } function status_api_identification() { $("#form_identification_token").hide(); $("#form_identification_token_thank").show(); } $("#block_6 label").click(function(e){ if($(this).children("input").is(':checked')){ $(this).css("background-image","url(/images/basket/bg_input_click.png)"); } else $(this).css("background-image",""); }); $("#basket_b_1").click(function (e) { $("#block_4").show(); $('html, body').animate({ scrollTop: $("#block_4").offset().top }, 500); $("#block_4 > .container>div").hide(); $("#basket_1").show(); }); $("#basket_b_2").click(function (e) { $("#block_4").show(); $('html, body').animate({ scrollTop: $("#block_4").offset().top }, 500); $("#block_4 > .container>div").hide(); $("#basket_2").show(); }); $("#basket_b_3").click(function (e) { $("#block_4").show(); $('html, body').animate({ scrollTop: $("#block_4").offset().top }, 500); $("#block_4 > .container>div").hide(); $("#basket_3").show(); });