Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HTML:
- <div class="menu-top cart">
- <div class="price"><a href="#" id="basketwidjet" onclick="cart.showWinow('bcontainer', 1)"></a></div>
- <div style="text-align: center"><a href="#!" onclick="cart.clearBasket()">Очистить корзину</a></div>
- </div>
- <div id="order" class="popup">
- <a href="#" onclick="cart.closeWindow('order', 0)" style="float:right">[закрыть]</a>
- <h4>Введите ваши контактные данные</h4>
- <form id="formToSend">
- <input id="fio" type="text" placeholder="Ваши фамилия и имя" class="" />
- <input id="city" type="text" placeholder="Город" class="text-input"/>
- <input id="phone" type="text" placeholder="Контактный телефон" class="text-input"/>
- <input id="email" type="text" placeholder="Электронная почта" class="" /><br>
- <textarea id="question" placeholder="Адрес"></textarea>
- </form>
- <button onclick="cart.sendOrder('formToSend,overflw,bsum');" href="#">Отправить заказ</button>
- </div></div>
- /*кнопка КУПИТЬ*/
- <form>
- <input type="submit" id="wicartbutton_001" onclick="cart.addToCart(this, '176', priceList['176'])" value="КУПИТЬ">
- </form>
- css:
- .bird{
- width: 100px;
- height: 30px;
- position: absolute;
- text-align: left;
- display: none;
- vertical-align: middle;
- font-size: 18px;
- }
- .blindLayer {
- background: none repeat scroll 0 0 rgba(0, 0, 0, 0.8);
- bottom: 0;
- left: 0;
- position: fixed;
- right: 0;
- top: 0;
- z-index: 1001;
- display: none;
- }
- .bcontainer{
- position: absolute;
- width: 800px;
- height: 400px;
- background: #fff;
- border: 8px solid #999;
- padding: 20px;
- display: none;
- z-index: 1002;
- }
- #overflw{
- overflow-y: scroll;
- overflow-x: hidden;
- height: 300px;
- }
- #bcaption{
- background: #C0C0C0;
- }
- #bcaption td{
- border-right: 2px solid #999;
- font-weight: bold;
- text-align: center;
- }
- #bcaption td {padding: 5px;}
- #bcaption td:nth-child(1) { width: 50px; } /*ID*/
- #bcaption td:nth-child(2) { width: 300px; } /*NAME*/
- #bcaption td:nth-child(3) { width: 100px; } /*PRICE*/
- #bcaption td:nth-child(4) { width: 150px; } /*NUM*/
- #bcaption td:nth-child(5) { width: 70px; } /*SUM*/
- .bitem td{
- font: normal 18px Arial;
- color: #999;
- padding: 5px;
- border-bottom: 1px solid #999;
- border-right: 2px solid #FFF;
- }
- .bitem td:nth-child(1) { width: 50px; }
- .bitem td:nth-child(2) { width: 300px; }
- .bitem td:nth-child(3) { width: 100px; text-align: center;}
- .bitem td:nth-child(4) { width: 150px; text-align: center;}
- .bitem td:nth-child(5) { width: 70px; text-align: center;}
- #bclose{
- float: right;
- }
- .bcontainer table{
- width: 100%;
- }
- .bbutton{
- color: #999;
- -webkit-box-shadow: 0px 0px 3px 0px rgba(50, 50, 50, 0.75);
- -moz-box-shadow: 0px 0px 3px 0px rgba(50, 50, 50, 0.75);
- box-shadow: 0px 0px 3px 0px rgba(50, 50, 50, 0.75);
- padding: 5px;
- font: bold 16px Arial;
- float: right;
- }
- #bsum{
- float: right;
- margin: 0 20px;
- font: normal 18px Arial;
- }
- .popup {
- background: none repeat scroll 0 0 #F2F2F2;
- border: 1px solid #808040;
- left: 50%;
- margin-left: -265px;
- padding: 25px 20px;
- position: fixed;
- top: 50px;
- width: 550px;
- z-index: 2002;
- display: none;
- }
- .popup h4 {
- margin-bottom: 4px;
- }
- .popup form {
- padding: 30px 0 0 0;
- }
- .popup input[type="text"]{
- text-align: center;
- font-style: italic;
- display: block;
- width: 100%;
- margin-bottom: 10px;
- border: 1px solid #D9D9D9;
- display: inline-block;
- height: 40px;
- line-height: 40px;
- padding: 0;
- vertical-align: middle;
- }
- .popup .alignCenter {
- margin-top: 30px;
- }
- .popup textarea {
- display: block;
- font-style: italic;
- margin-bottom: 10px;
- text-align: left;
- width: 100%;
- border: 1px solid #D9D9D9;
- }
- .basket_num{
- padding: 4px;
- background: #F0F0F0;
- }
- .basket_num_buttons{
- width: 20px;
- height: 20px;
- border: 1px solid #000;
- margin: 0 5px;
- display: inline-block;
- color: #FFF;
- background: #000;
- text-align: center;
- cursor: pointer;
- }
- script:
- <script>
- var cart;
- var config;
- var wiNumInputPrefID;
- $(document).ready(function(){
- cart = new WICard("cart");
- config = {'clearAfterSend':true, 'showAfterAdd':false};
- cart.init("basketwidjet", config); }); document.addEventListener('visibilitychange', function(e) {cart.init("basketwidjet", config);
- }, false)</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement