Hello!
First I would like to say that I'm very new to JavaScript, so perhaps I'm trying to do this the wrong way...
I have a shopping cart, and when a customer puts a product in the cart, a pop up shows to confirm this. But the problem is that I have a "mini-cart" on the side of the webpage that should show the amount of products and cost, but this minicart doesn't update until one refreshes the page...
So my question is if it's possible to only update/refresh a certain <div> using JavaScript or perhaps Jquery?
I have been trying this:
and been playing around, but no luck...
I'm glad for any help I can get
Regards
Fredrik H
First I would like to say that I'm very new to JavaScript, so perhaps I'm trying to do this the wrong way...
I have a shopping cart, and when a customer puts a product in the cart, a pop up shows to confirm this. But the problem is that I have a "mini-cart" on the side of the webpage that should show the amount of products and cost, but this minicart doesn't update until one refreshes the page...
So my question is if it's possible to only update/refresh a certain <div> using JavaScript or perhaps Jquery?
I have been trying this:
Code:
<script>
$(function() {
$("#masterofrefresh").click(function() {
$("#minicart").load("sidmeny.php")
return false;
})
})
</script>
and been playing around, but no luck...
I'm glad for any help I can get
Regards
Fredrik H