cancel
Showing results for 
Search instead for 
Did you mean: 

minicart popup onmoushover doesnt work afte ajax add to cart

minicart popup onmoushover doesnt work afte ajax add to cart

in my magento 1.8.1,  i am trying to add a product via ajax add to cart and that works fine for me . i have also used minicart popup that pop up the minisidebar cart on mouse hover to the mycart link in the top links.

the problem i am facing is when i am adding a product via ajax then my pop up minicart doesnt works on mouse hover, to make it work i have to refresh the page.

 

here is the script for popup mini cart :

 

document.observe('dom:loaded', function() {
  $('minicart').observe('mouseover', function(e) {
    $('minicart-panel').show();
  });
  $('minicart').observe('mouseout', function(e) {
    $('minicart-panel').hide();
  });
});

i have also tried includin jQuery.noConflict(); or $.noConflict();

nothing works for me.

 

please help,

 

 

 

1 REPLY 1

Re: minicart popup onmoushover doesnt work afte ajax add to cart

That happens because you have mouseover and mouseout event set for the minicart class.

Most likely, after a product is added to the cart, the blog checkout/cart_sidebar (checkout/minicart) is replaced and the jQuery event for the minicart gets lost.

 

To fix that, you need to exclude the minicart class from the ajax response block.

______________________________________________________________
Innovative, top-performing Magento Extensions (with an array of FREE tools).