How to work wordpress ajax with fancybox 3?
Hello facnyapps,
OOhh very fast support serves, Very good.
Thank you again, Our facancybox popup complete working now, but our full page display in popup. why?
I need to display clickable only one product in popup, but display full page in popup.
We will some mistack in fancybox popup js or html. Please you can see our below html code:
HTML Code:
<a class="quickview" href="#" data-product_id="187">Quick View</a>
JS Code:
$(document).on('click', '.quickview', function(e) {
e.preventDefault();
var pid = $(this).attr('data-product_id');
$.fancybox.open({
src : myAjax.ajaxurl + '?action=fan_product_quickview&pid=' + pid,
type : 'ajax',
opts : {
onComplete : function() {
$('.flex-control-thumbs').owlCarousel({
loop: true,
responsiveClass: true,
responsiveRefreshRate : 10,
rtl : fan_rtl,
nav: true,
navText: ['',''],
dots:false,
items: 3,
});
}
}
});
return false;
});
Thank you so much for your help !!!
Sorry, I could not understand.
Hello guys,
Why you have closed request without resolve our issue?
When i click on quick view button, then displayed full page ( Browser full page ) in popup, but I need to display only clickable one product in popup, not full page display in popup.
We will some mistack in fancybox popup js or html. Please you can see our below html code:
HTML Code:
<a class="quickview" href="#" data-product_id="187">Quick View</a>
JS Code:
$(document).on('click', '.quickview', function(e) {
e.preventDefault();
var pid = $(this).attr('data-product_id');
$.fancybox.open({
src : myAjax.ajaxurl + '?action=fan_product_quickview&pid=' + pid,
type : 'ajax',
opts : {
onComplete : function() {
$('.flex-control-thumbs').owlCarousel({
loop: true,
responsiveClass: true,
responsiveRefreshRate : 10,
rtl : fan_rtl,
nav: true,
navText: ['',''],
dots:false,
items: 3,
});
}
}
});
return false;
});
Thank you so much for your help !!!