Код:
<!--HTML--> <style> #p148 legend, #p148 .post-author, #p148 .post-sig, #p148 pl-email { display: none } #p148 .post-body { margin-left:0! important; } #p148-content { margin-left:-80px !important; width: 115% !important; } </style> <script> $(document).ready(function(){ var user_login = window.UserLogin; $('#store_goForward').click(function() { event.preventDefault(); $('#store_item_window').animate({ scrollLeft: "+=800px" }, "slow"); }); $('#store_goBack').click(function() { event.preventDefault(); $('#store_item_window').animate({ scrollLeft: "-=800px" }, "slow"); }); function removeA(arr) { var what, a = arguments, L = a.length, ax; while (L > 1 && arr.length) { what = a[--L]; while ((ax= arr.indexOf(what)) !== -1) { arr.splice(ax, 1); } } return arr; } function get_group() { var markup = document.documentElement.innerHTML; x = markup.search('var GroupID ='); if (x==-1) { return x } x = x + 14 res = "" while (markup[x]!=';' ) { res += markup[x] x++; } return parseInt(res) } total_bill = 0 what_bought = [] $('.store_buy').click(function(e){ var myClass = $(this).prev().attr("id"); var copy_hidden = $("#"+myClass).clone(); copy_hidden.css("position", "relative"); copy_hidden.css("left", "0px"); copy_hidden.css("top", "0px"); copy_hidden.append("<div id='store_delete'>X</div>") copy_hidden.appendTo("#store_box").wrap('<div class="store_box_wrap"></div>'); //copy_hidden.show(); //$('#store_box').find("#"+myClass+":last").slideDown("slow"); user_group = get_group(); if (myClass == 'buy_1') { prices = [0, 100, 200, 300]; } else if (myClass=='buy_2') { prices = [0,100, 200, 300]; } else if (myClass=='buy_3') { prices = [700,100, 200, 300]; } else if (myClass=='buy_4') { prices = [1100,100, 200, 300]; } else if (myClass=='buy_5') { prices = [500,100, 200, 300]; } else if (myClass=='buy_6') { prices = [600,100, 200, 300]; } else if (myClass=='buy_7') { prices = [2000,100, 200, 300]; } else if (myClass=='buy_8') { prices = [1800,100, 200, 300]; } else if (myClass=='buy_9') { prices = [2300,100, 200, 300]; } user_group = 0; if (prices[user_group]!=undefined) { total_bill+=prices[user_group]; what_bought.push($("#"+myClass).text()); } $('#store_value_total').text(total_bill); }); $(document).on('click','#store_delete',function(){ var myClass = $(this).parent().attr('id'); console.log(myClass) console.log($(this).closest("#"+myClass).parent()) $(this).closest("#"+myClass).parent().remove(); user_group = get_group(); if (myClass == 'buy_1') { prices = [0, 100, 200, 300]; } else if (myClass=='buy_2') { prices = [0,100, 200, 300]; } else if (myClass=='buy_3') { prices = [700,100, 200, 300]; } else if (myClass=='buy_4') { prices = [1100,100, 200, 300]; } else if (myClass=='buy_5') { prices = [500,100, 200, 300]; } else if (myClass=='buy_6') { prices = [600,100, 200, 300]; } else if (myClass=='buy_7') { prices = [2000,100, 200, 300]; } else if (myClass=='buy_8') { prices = [1800,100, 200, 300]; } else if (myClass=='buy_9') { prices = [2300,100, 200, 300]; } user_group = 0; if (prices[user_group]!=undefined) { removeA(what_bought, $("#"+myClass).text()); total_bill-=prices[user_group]; } $('#store_value_total').text(total_bill); }); $('#store_lets_run').click(function(e){ console.log(window.UserLogin); if (user_login!=-1) { $("#store_unique_login").val(user_login); $('#store_send').fadeIn( "slow" ); var copy_hidden = $("#"+'store_box').clone().html();; $('.store_user_info').val(total_bill+'; ' + what_bought); } }); }); </script> <style> #store_delete { width:15px; font-family: monospace; text-align:center; margin:1px; height:15px; float:right; cursor: pointer; font-size:10px; color:white; font-weight: 800; } #store_box { position: relative; top:35px; height:130px; width:670px; left:15px; padding:10px; overflow-x: auto; } .store_box_wrap { position:relative !important; width:190px; height:24px; padding:5px; display: inline-block; } #store_wrapper { position: relative; height:403px; width:987px; font-family: monospace; background-image: url('https://forumstatic.ru/files/0018/26/71/67294.png'); } #store_item_window { width:812px; margin-left:20px; margin-top:72px; position:relative; height:250px; display:inline-block; white-space: nowrap; overflow-x: hidden; } .store_el_wrap { position:relative; height:227px; width:193px; margin-right:5px; display: inline-block; padding:0px; } .store_element{padding: 4px; position: absolute; /* height: 26px; */ width: 180px; top: 77px; color: white; border-radius: 10px; text-align: center; font-family: Proxima Nova Rg; text-transform: uppercase; font-size: 14px; left: 2px; } .store_buy {position: absolute; /* height: 23px; */ width: 182px; top: 199px; left: 2px; padding: 4px; cursor: pointer; text-align: center; font-family: Proxima Nova rg; color: white; text-shadow: 0px 0px 10px #ffffff94; font-size: 14px; border-radius: 10px; } #store_finalize{ height:40px; width: 120px; top:176px; left:547px; position:absolute; text-align:center; } #store_send { height:40px; width: 120px; top:250px; left:390px; position:absolute; } #store_box_wrapper { position:relative; width:987px; height:229px; background-image:url('https://forumstatic.ru/files/0018/26/71/28097.png') } .store_total_sum { width:70px; position:absolute; left:877px; top:157px; display:inline-block; text-align:left; color:white; font-size:20px; font-family: Proxima Nova rg; } #sum_val { display:inline-block; } #store_title { color:white; position:absolute; font-family: Proxima Nova Rg; font-size:30px; top:22px; left:47px; width:150px; text-align:center; } #buy_1 { background:#7aa163; } #buy_2 { background:#e68141; } #buy_3 { background:#bf4b4b; } #buy_4 { background:#a15272; } #buy_5 { background:#5091bb; } #buy_6 { background:#8173b0; } #buy_7{ background:#3f9296; } #buy_8{ background:#6273ab; } #buy_9{ background:#bba961; } .store_head_days { color:white; text-align:center; font-family: Roboto Condensed; font-size:20px; position:absolute; width:192px; height:25px; background:#385ba0; top:132px; } .store_el_background{ position:absolute; background-image: url('https://forumstatic.ru/files/0018/26/71/34103.png'); height:122px; width:193px; } .store_el_clarification { position: absolute; font-size: 10px; text-align: center; color: white; font-family: Proxima Nova rg; text-transform: uppercase; width: 180px; top: 106px; height: 55px; left: 8px; } .store_money_vals { position: absolute; font-family: Arial Narrow; font-size: 12px; text-align: center; color: white; text-shadow: 1px 0px 0px #5f5f5f; font-weight: bold; width: 180px; top: 158px; height: 38px; left: 8px; } .store_go {position: absolute; /* background: #53597f; */ background: linear-gradient(#7c83b1,#53597f); color: white; font-family: Proxima Nova rg; font-size: 14px; line-height: 20px; width: 120px; padding-top: 4px; text-transform: uppercase; text-align: center; cursor: pointer; height: 24px; border-radius: 10px; text-shadow: 1px 0px 0px #646886; } #store_goBack { top:345px; left:175px; } #store_goForward { top:345px; left:310px; } fieldset { border:0px; } textarea { display:none; } #post-form { visibility:hidden; height:1px; } #store_finalize input[type="submit" i] { border: 0px !important; box-shadow: none; width: 120px !important; height: 25px !important; background: transparent !important; color: transparent !important; cursor: pointer !important; position: relative; border-radius: 10px; top: 13px; left: -15px; } } </style> <div> <div id="store_wrapper"> <div id="store_title">YouStore</div> <div id="store_item_window"> <div class="store_el_wrap"> <div class="store_el_background" style="background-image: url(http://youtube.ucoz.site/themes/pack/y-1.jpg);"></div> <div class="store_el_clarification">bonus pack: 1000 </div> <div class="store_head_days">БЕССРОЧНО </div> <div class="store_money_vals">кот в мешке: индивидуальный<br> приз за 1000 сообщений </div> <div class="store_element" id="buy_1">КЛИККЛАК </div> <div class="store_buy" id="buy_1">БЕСПЛАТНО</div> </div> <div class="store_el_wrap"> <div class="store_el_background" style="background-image: url(http://youtube.ucoz.site/themes/pack/y-2.jpg);"></div> <div class="store_el_clarification">bonus pack: 5000 </div> <div class="store_head_days">БЕССРОЧНО </div> <div class="store_money_vals"> кот в мешке: индивидуальный <br>приз за 5000 сообщений </div> <div class="store_element" id="buy_2">МЕТ ГАЛА </div> <div class="store_buy" id="buy_2">БЕСПЛАТНО</div> </div> <div class="store_el_wrap"> <div class="store_el_background" style="background-image: url(http://youtube.ucoz.site/themes/pack/y-3.jpg);"></div> <div class="store_el_clarification">подписчики: +100k </div> <div class="store_head_days">БЕССРОЧНО </div> <div class="store_money_vals"> <br> накрутка 100k подписчиков </div> <div class="store_element" id="buy_3">КРЕМЛЕБОТЫ </div> <div class="store_buy" id="buy_3">КУПИТЬ ЗА $700</div> </div> <div class="store_el_wrap"> <div class="store_el_background" style="background-image: url(http://youtube.ucoz.site/themes/pack/y-4.jpg);"></div> <div class="store_el_clarification">подписчики: +500k </div> <div class="store_head_days">БЕССРОЧНО </div> <div class="store_money_vals"> <br> накрутка 500k подписчиков </div> <div class="store_element" id="buy_4">ФАБРИКА ТРОЛЛЕЙ </div> <div class="store_buy" id="buy_4">КУПИТЬ ЗА $1100</div> </div> <div class="store_el_wrap"> <div class="store_el_background" style="background-image: url(http://youtube.ucoz.site/themes/pack/y-5.jpg);"></div> <div class="store_el_clarification">лайки: +100 </div> <div class="store_head_days">БЕССРОЧНО</div> <div class="store_money_vals"> быстро прокачать репутацию <br> (не менее 50 сообщений) </div> <div class="store_element" id="buy_5">GHOSTBUSTERS </div> <div class="store_buy" id="buy_5">КУПИТЬ ЗА $500</div> </div> <div class="store_el_wrap"> <div class="store_el_background" style="background-image: url(http://youtube.ucoz.site/themes/pack/y-6.jpg);"></div> <div class="store_el_clarification">попасть в выпуск блогера </div> <div class="store_head_days">4 ДНЯ (ВТ-ПТ)</div> <div class="store_money_vals"> гарантированное попадание в <br>следующий выпуск блогера <br>доступно мест: 0/5 </div> <div class="store_element" id="buy_6">ПИАР КАНАЛОВ </div> <div class="store_buy" id="buy_6">КУПИТЬ ЗА $600</div> </div> <div class="store_el_wrap"> <div class="store_el_background" style="background-image: url(http://youtube.ucoz.site/themes/pack/y-7.jpg);"></div> <div class="store_el_clarification">cпецвыпуск о тебе</div> <div class="store_head_days">3 ДНЯ (ПН-СР)</div> <div class="store_money_vals"> полный обзор эпизода на <br> канале «Точка Бифуркации» <br>доступно выпусков: 0/1 </div> <div class="store_element" id="buy_7">BAD COMEDIAN </div> <div class="store_buy" id="buy_7">КУПИТЬ ЗА $2000</div> </div> <div class="store_el_wrap"> <div class="store_el_background" style="background-image: url(http://youtube.ucoz.site/themes/pack/y-8.jpg);"></div> <div class="store_el_clarification">иммунитет на чистку</div> <div class="store_head_days">БЕССРОЧНО</div> <div class="store_money_vals"> одно использование<br> с одного профиля </div> <div class="store_element" id="buy_8">СПАСИ И СОХРАНИ </div> <div class="store_buy" id="buy_8">КУПИТЬ ЗА $1800</div> </div> <div class="store_el_wrap"> <div class="store_el_background" style="background-image: url(http://youtube.ucoz.site/themes/pack/y-9.jpg);"></div> <div class="store_el_clarification">вторая роль вне правил </div> <div class="store_head_days">БЕССРОЧНО</div> <div class="store_money_vals"> твинк без постов<br>одно использование </div> <div class="store_element" id="buy_9">ГОРИ, ГОРИ ЯСНО </div> <div class="store_buy" id="buy_9">КУПИТЬ ЗА $2300</div> </div> </div> <div class="store_go" id="store_goBack"> << Назад</div> <div class = "store_go" id="store_goForward">Вперед >></div> </div> <div id="store_box_wrapper"><div id="store_box"> </div> <div id="store_finalize"> <div id="post-form" class="formal" style="visibility:visible"> <form id="post" class="container" style="background:transparent; border:0px;" method="post" action="/post.php?tid=11" onsubmit="return RusffCore.TopicPostHandler(this)"> <fieldset> <div class="fs-box hashelp"> <div id="formkey"></div> <div id="formetc" style="display:none"></div> <input type="hidden" name="form_sent" value="1"> <input type="hidden" name="form_user" id="store_unique_login" value=""> <p class="areafield required"> <span class="input"><textarea class="store_user_info" id="main-reply" style="display:none;" name="req_message" rows="13">s</textarea></span></p><p class="formsubmit"><input type="submit" id="store_lets_run" class="button" name="submit" value="" accesskey="s" title="Accesskey:s"></p> </div> </fieldset> </form> </div> </div> <div class="store_total_sum"> <div id="store_value_total">0</div></div> </div></div>