Hi guys, is it possible to change the round cart button link ?
It open a popup, I need it go to the cart page.
<div id="btnCart"><strong>Cart</strong></div>
<a id="btnCart" href="#"><strong>Cart</strong></a>
if(jQuery('#gkPopupCart').length > 0) {
var btn = jQuery('#btnCart');
popup_cart = jQuery('#gkPopupCart');
popup_cart_h = popup_cart.find('.gkPopupWrap').outerHeight();
var wait_for_results = true;
var wait = false;
jQuery(window).scroll(function() {
var scroll = jQuery(window).scrollTop();
var max = jQuery('#gkMainWrap').height();
var final = 0;
if(scroll > 70) {
if(scroll < max - 122) {
final = scroll - 50;
} else {
final = max - 172;
}
} else {
final = 20;
}
btn.css('top', final + "px");
});
btn.click(function(e) {
e.preventDefault();
e.stopPropagation();
popup_overlay.css('height', jQuery('body').outerHeight());
popup_overlay.css({'opacity' : 0.45});
popup_overlay.fadeIn('fast');
opened_popup = 'cart';
if(!wait) {
jQuery.ajax({
url: $GK_URL + 'index.php?tmpl=cart',
beforeSend: function() {
btn.addClass('loading');
wait = true;
},
complete: function() {
var timer = (function() {
if(!wait_for_results) {
wait_for_results = true;
wait = false;
clearInterval(timer);
}
});
},
success: function(data) {
jQuery('#gkAjaxCart').html(data);
popup_cart.css('display', 'block');
popup_cart.css('display', 'block');
popup_cart.animate({'opacity':1, 'margin-top':0},200, 'swing');
popup_cart.addClass('gk3Danim');
btn.removeClass('loading');
//popup_cart.css('opacity', 0).css('margin-top', '-50px');
wait_for_results = false;
wait = false;
}
});
}
});
}