i using jqtouch make s simple shopping cart, not familiar jqtouch should know "pages" made of divs using div id fragment identifier within index page. have 1 big page filled divs make sub pages......anyhue. shopping cart has it's own identifier.
<div id="checkout"> <div class="toolbar"> <h1>checkout</h1> <a href="#" class="back">back</a> </div> <ul id="trolley" class="rounded"><li>cart empty</li></ul> </div>
once user finishes ordering can go "checkout" runs rather ugly solution.
case "trolley": $('#checkout').bind('pageanimationend', function(e, info){ $("#trolley").html(stripslashes(data.contents)) }); break;
what im trying here json result post request (data.contents) , dump in trolley after animation has completed.
this works seamlessly in chrome on desktop on touch comes "cart empty". have tried load div @ animation start, have tried load div before animating no dice. if leave cart , go in again work correctly.
i should mention how call cart.
<a class="button" id="cart" href="#checkout" onclick="cart('0','trolley')" >$0.00</a>
this tells script there nothing add return trolley contents.
any suggestions?
in end removed href checkout button , used following after div had been updated.
jqt.goto('#checkout', 'slideup');
Comments
Post a Comment