pcavenida Posted February 3, 2016 Share Posted February 3, 2016 Hi! Is the first time that I'am using this forum. My problem is that I want to close the quick view fancybox to open another Windown. And for that i am using in my code the parent.$.fancybox.close() to close the Quick View Windows. When the user click in the Add to cart button. The quick view close and my program in js STOP running. example: $(x).click(function() { parent.$.fancybox.close(); <------- Using the fancybox.close() the program ends. Like a Return... How can I close the Quick View Window and open another window? idCombination = $('#idCombination').val(); $.ajax({ type: "POST", url: baseUri + '?rand=' + new Date().getTime(), // url: $("#buy_block").attr("action"), 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): ''), // data: $('#buy_block').serialize(), 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; }); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now