Answer the question
In order to leave comments, you need to log in
Why is FancyBox bringing up the page?
Guys, what is the reason that the content after clicking and displaying raises the page?
BUTTON TO OPEN PRODUCT PREVIEW/div>
$(document).on("click", ".preview", function(){
var id = $(this).attr('id');
$.ajax({
type: 'post',
data: 'id=' + id,
url: '/ajax/preview.php',
success: function (data){
$.fancybox(data); //data = '<div id="#preview_item">HTML CODE</div>'
return false;
},
error: function(){
alert('fatal error');
}
});
return false;
});
Answer the question
In order to leave comments, you need to log in
Wang that the body has a height of 100%, remove it and everything should be ok.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question