在ajax调用之后,价格计算器不起作用

时间:2015-10-12 14:48:16

标签: javascript php jquery ajax

我的价格计算器在ajax调用后无效。我希望有人可以帮助我。

ajax call

<script type="text/javascript">
    $(document).ready(function(){
        $('#bundesland_products').change(function(){
            var url = '/inc/products_new.php?id=' + $(this).val();
            $('#products').load(url);
        });
    });
</script>

价格计算器

<script>
$(document).ready(function() {
    $('.option').on('click', function() {
        var total = 0;
        $('.option:checked').each(function() {
            total += parseInt($(this).attr('price'));
        });
        $('#total').html(+total+',00 EUR');
    });
});</script>

HTML

<div>Gesamtpreis: <strong><span id="total">0,00 EUR</span></strong></div>

0 个答案:

没有答案
相关问题