Answer the question
In order to leave comments, you need to log in
How to update a div element on button click?
How to update a div element without reloading the page. When you click the add button. I know that this is implemented using Ajax, but I can’t figure out how exactly.
Answer the question
In order to leave comments, you need to log in
Можно использовать такую структуру:
Pjax::begin()
Form [data-pjax='']
Итого: Yii::$app->cart->getTotalSum();
Pjax::end()
Я знаю что это реализуется с помощью Ajax
$('.someButton').on('click',function(){
var price = $('.someInputeSelector').val();
var count = $('.someInpute2Selector').val();
var summ = price * count;
$('.someSelector').text('Итого:' + summ + 'рублей');
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question