Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- //функция обновления суммы
- function updateSum(id) {
- //переменные
- var count = $(".summ").find("input#count_"+id).val(); //кол-во товара
- var opts = {
- symbol: "руб.",
- format: "%v %s",
- thousand: " ",
- decimal: ","
- }; //валюты
- //Цена товара
- for( var i = 0; i != 9; i++ ) {
- var price = $(".price_type").find("span#iprice"+i+"_"+id).attr("alt");
- $(".price_type").find('span#rprice'+i+'_'+id).text(accounting.formatMoney(parseInt(price)*count, opts));
- }
- }
- //Клики по кнопкам
- $(this).find('input.plus').bind('click', function(){
- updateSum($(this).attr("id"));
- });
- $(this).find('input.minus').bind('click', function(){
- updateSum($(this).attr("id"));
- });
- });
Add Comment
Please, Sign In to add comment