From 163cc3ac046efa76df0eaab85919a1b512cda82d Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Tue, 28 Jun 2016 15:03:07 +0200 Subject: [PATCH] adding html bind --- modules/expresscart/header2.tpl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/expresscart/header2.tpl b/modules/expresscart/header2.tpl index 75583a5c..c0dd23a9 100644 --- a/modules/expresscart/header2.tpl +++ b/modules/expresscart/header2.tpl @@ -2,11 +2,13 @@ {literal} function hideExpressCart(event){ - if(".button.expresscart.active" == $(event.target)) { + if($(".expresscart_frame:visible").length > 0) { event.data.m.removeClass('active'); $(".expresscart_frame").slideUp(); - $("html").unbind("click", hideExpressCart); + $(".expresscart_frame").remove(); $('.close_popup_footer').remove(); + $("html").unbind("click", hideExpressCart); + initButtons(); } return false; } @@ -33,9 +35,9 @@ function showExpressCart(event) { return false; }); + $("html").bind("click", {m: m}, hideExpressCart); }); } - $("html").bind("click", {m: m}, hideExpressCart); return false; }