From debfc8648cb7b6d2bed8e27f18c8c9ae49f05690 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Mon, 28 May 2012 09:32:23 +0000 Subject: [PATCH] [-] MO : #PSCFV-2587 - Fix bug with sliding up block cart --- modules/blockcart/ajax-cart.js | 40 +++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index 10d2b7bc5..91b413fee 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -671,22 +671,32 @@ $(document).ready(function(){ var cart_block = new HoverWatcher('#cart_block'); var shopping_cart = new HoverWatcher('#shopping_cart'); - $("#shopping_cart a:first").hover(function(){ - $(this).css('border-radius', '3px 3px 0px 0px'); - $("#header #cart_block").stop(true, true).slideDown(450); - }, - function() { - $(this).css('border-radius', '3px'); - $("#header #cart_block").stop(true, true); - if (!shopping_cart.isHoveringOver() && !cart_block.isHoveringOver()) - $("#header #cart_block").slideUp(450); - }); + $("#shopping_cart a:first").hover( + function() { + $(this).css('border-radius', '3px 3px 0px 0px'); + $("#header #cart_block").stop(true, true).slideDown(450); + }, + function() { + $('#shopping_cart a').css('border-radius', '3px'); + setTimeout(function() { + if (!shopping_cart.isHoveringOver() && !cart_block.isHoveringOver()) + $("#header #cart_block").stop(true, true).slideUp(450); + }, 200); + } + ); - $("#cart_block").hover(function() {}, function(){ - $("#header #cart_block").stop(true, true); - if (!shopping_cart.isHoveringOver() && !cart_block.isHoveringOver()) - $("#header #cart_block").slideUp(450); - }); + $("#cart_block").hover( + function() { + $('#shopping_cart a').css('border-radius', '3px 3px 0px 0px'); + }, + function() { + $('#shopping_cart a').css('border-radius', '3px'); + setTimeout(function() { + if (!shopping_cart.isHoveringOver()) + $("#header #cart_block").stop(true, true).slideUp(450); + }, 200); + } + ); $('.delete_voucher').live('click', function() { $.ajax({url:$(this).attr('href')});