jQuery Checkout.js

,Checkout.js is a jQuery plugin for easy to implementation of check out for e-commerce websites.,A Simple of checkout.js example as shown below, <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta http-equiv = "Content-Type" content = "text/html; charset = iso-8859-1" /> <title>Untitled Document</title> <script type = "text/javascript" src = "jquery-1.3.2.js"></script> <script type = "text/javascript" src = "jquery.livequery.js"></script> <link href = "css.css" rel = "stylesheet" /> \t\t <script type = "text/javascript"> $(document).ready(function() { \t var Arrays = new Array(); \t $('# pak li'). mousemove (function() {var holdning = $(det). position(). $('# cart "). stop(). manipulerer ({tilbage: holdning. til venstre.'px'}, 250, function() (})}). mouseout (function() (}). $('# pak li'). klik (function() {var thisid = $(det). attr ('id) var itemname = $(dette). ('div. navn). html(), var itemprice = $(dette). ('div. pris). html(); hvis (herunder (arrays, thisid)) (var - pris = $('# hver - + thisid). børn (". shopp pris ").find ('em '). html(); var mængde = $('&#hver - + thisid). børn (". shopp mængde"). html(); mængde = parseint (mængde) + parseint (1) var i alt = parseint (itemprice) * parseint (mængde); $('# hver - + thisid). børn (". shopp pris").find ('em). http: //(i alt); $('# hver - + thisid). børn (". shopp mængde"). http: //(mængde), var prev_charges = $(. vogn samlede levetid). html(); prev_charges = parseint (prev_charges) - parseint (priser); prev_charges = parseint (prev_charges) + parseint (i alt); $(. vogn samlede levetid). http: //(prev_charges); $('&#samlede skjulte gebyrer). val (prev_charges)} andre {arrays. tryk (thisid) var prev_charges = $(. vogn samlede levetid). html(); prev_charges = parseint (prev_charges) + parseint (itemprice); $(. vogn samlede levetid). http: //(prev_charges); $('# samlede skjult-charges').val(prev_charges); $('#left_bar .cart-info').append(' <div class = "shopp" id = "each-'+thisID+'"> <div class = "label">'+itemname+'</div> <div class = "shopp-price"> $<em>'+itemprice+'</em></div> <span class = "shopp-quantity">1</span> <img src = "remove.png" class = "remove" /> <br class = "all" /> </div>'); $('#cart').css({'-webkit-transform' : 'rotate(20deg)','-moz-transform' : 'rotate(20deg)' }); } settimeout ('angle(), 200)}); $("fjerne"). livequery ('click, function() {var fratrække = $(det). parent(). børn (". shopp pris"). ('em'). html(), var prev_charges = $(cart samlede. span '). html(), var thisid = $(det). parent(). attr ('id). erstatte (»hver - "," ") var pos = getpos (arrays, thisid) arrays. splejsning (pos." 0 ") prev_charges = parseint (prev_charges) - parseint (fradrag); $(. vogn samlede levetid). http: //(prev_charges); $('&#samlede skjulte gebyrer). val (prev_charges); $(det). parent(). remove().}); $('# fremsætte"). livequery('click', function() { var totalCharge = $('#total-hidden-charges').val(); $('#left_bar').html('Total Charges: $'+totalCharge); return false; });\t }); function include(arr, obj) { for(var i = 0; i<arr.length; i++) { if (arr[i] == obj) return true; } } function getpos(arr, obj) { for(var i = 0; i<arr.length; i++) { if (arr[i] == obj) return i; } } function angle(){$('#cart').css({'-webkit-transform' : 'rotate(0deg)','-moz-transform' : 'rotate(0deg)' });} </script> </head> <body> <div align = "left"> <div id = "wrap" align = "left"> <ul> <li id = "1"> <img src = "a1.png" class = "items" height = "100" alt = "" /> <br clear = "all" /> <div><span class = "name">Learn Java: Price</span>: $<span class = "price"> 800</span> </div> </li> <li id = "2"> <img src = "5.png" class = "items" height = "100" alt = "" /> <br clear = "all" /> <div><span class = "name">Learn HTML </span>: $<span class = "price">500 </span></div> </li> <li id="3"> <img src = "1.png" class = "items" height = "100" alt = "" /> <br clear = "all" /> <div><span class = "name">Learn Android </span>: $<span class = "price">450 </span></div> </li> <li id = "4"> <img src = "6.png" class = "items" height = "100" alt = "" /> <br clear = "all" /> <div><span class = "name">Learn SVG </span>: $<span class = "price">1200 </span></div> </li> <li id = "5"> <img src = "7.png" class = "items" height = "100" alt = "" /> <br clear = "all" /> <div> <span class = "name">Learn Bootstrap </span>: $<span class = "price">65 </span></div> </li> <li id = "6"> <img src = "5.png" class = "items" height = "100" alt = "" /> <br clear = "all" /> <div><span class = "name">Learn HTML </span>: $<span class = "price">800 </span> </div> </li> <li id = "7"> <img src = "7.png" class = "items" height = "100" alt = "" /> <br clear = "all" /> <div><span class = "name"> Learn Bootstrap </span>: $<span class = "price">45 </span></div> </li> <li id = "8"> <img src = "6.png" class = "items" height = "100" alt = "" /> <br clear = "all" /> <div><span class = "name">Learn SVG </span>: $<span class = "price">900 </span></div> </li> <li id = "9"> <img src = "8.png" class = "items" height = "100" alt = "" /> <br clear = "all" /> <div><span class = "name">Learn Angular Js </span>: $<span class = "price">20 </span></div> </li> </ul> <br clear = "all" /> </div> <div id = "left_bar"> <form action = "#" id="cart_form" name = "cart_form"> <div klasse = "- -" > < /div > < div klasse = "vogn samlede" > < b > samlede omkostninger: < /b > $< span > 0 < /span > < input type = "skjulte" navn = "samlede skjulte gebyrer" id = "samlede skjulte gebyrer" værdi = "0" /> < /div > < knap type = "stille" id = "stille" > kassen < /knap > < /form > < /div > < /div > < /organ > < /html > det bør føre til følgende resultat −, klik her,



Previous:
Next Page: