Hi!

I try to make a script to change the prize between with tax and
without but I cant get it to work whats wrong?


var sant = 'no';
var pris = $('#productPrices').html();
$('#tax a').click(function(){
    if(sant == 'no'){
        var pris2 = pris.replace(/[^0-9.,]+/g, '').replace(/[,]+/g,
'.');
        pris2 = parseInt(pris2)*.75;
        $('#productPrices').html(pris2 + ':-');
        sant = 'yes';
    }else{
        $('#productPrices').html(pris);
    }
    return false;
});

Reply via email to