Skip to main content

jquery problem with open minicardminicart

Source Link

jquery problem with open minicard

For open minicart on click i wrote:

<div class="mini-cart" style="cursor:pointer;"></div>


<script type="text/javascript">
jQuery(function($){
    $('.mini-cart').click(function(){
        $('.topCartContent').toggle();
        
    })
});
 </script>

but there is a problem in script jquery. If i go down with the scroll, and then i go up, the script not work. What the problem?