fancybox.close() and open another fancybox -
is first time i'am using forum.
my problem want close fancybox open fancybox. , using in code parent.$.fancybox.close()
close fancybox iframe window. when user click in add cart button. fancybox close , program in js stop running. example:
$(x).click(function(){ parent.$.fancybox.close(); idcombination = $('#idcombination').val(); $.ajax({ type: "post", url: baseuri + '?rand=' + new date().gettime(), data: 'controller=cart&add=1&ajax=true&qty=' + $('#quantity_wanted').val() + '&id_product=' + id_product + '&token=' + static_token + ( (parseint(idcombination) && idcombination != null) ? '&ipa=' + parseint(idcombination): ''), beforesend: function() { $('#loading_img').show(); }, success: function(q) { $.ajax({ type: "post", url: path + "ajaxcart/pop_up.php",data:'referer='+document.referrer, beforesend: function() { $(".shop").show(); $('#loading_img').show(); }, success: function(res) { $(".shop").show(); $("#shopping").show(); $('#loading_img').hide(); $('#shopping').html(res); } }); } }); $("html, body").animate({scrolltop: 300}, "slow"); return false; });
Comments
Post a Comment