Reputation: 1853
I'm loading a page dynamically via fancybox and AJAX. Everything is fine except when the dynamically loaded page is too tall for the screen. It will simply overflow past the bottom of the screen.
I'm using..
function dynamic_page(){
var url = "#ajax url here#";
$.fancybox.showLoading();
$.post(url, function(res){
$.fancybox.open(res,{
afterClose : function (){
$("#remove_val").val(0);
}
});
$.fancybox.update();
});
}
When a user clicks the page, it will reload again dynamically, keeping the width and height of the original fancybox:
$.post(url, function(res){
if(res){
$("#page_load_here").html(res);
}
How do I resize or recenter the fancybox according to the dynamically loaded page's height?
All help would be appreciated
Upvotes: 1
Views: 403