Manually trigger window resize to fix circular missbehaviour on several browsers

This commit is contained in:
BNoiZe
2013-11-29 13:55:27 +01:00
parent 21f7c82a95
commit 9986c3405e

View File

@@ -25,20 +25,21 @@ $(document).ready(function() {
return false; return false;
}); });
// Load Newsfeed
var ajax_load = "<div id='newsitem'>Loading newsfeed...</div>";
$("#newsfeeditems").html(ajax_load).load("lib/ajax.php?action=newsfeed", function() {
if ($("#newsfeeditems").html() != "") {
$(window).trigger('resize');
$("#newsfeed").slideDown();
}
});
// Height of divs fix // Height of divs fix
var snheight = $('#sidenavigation').height(); var snheight = $('#sidenavigation').height();
var mainheight = $('#maincontent').height(); var mainheight = $('#maincontent').height();
if (snheight > mainheight) { if (snheight > mainheight) {
$('#maincontent').height(snheight - 60); $('#maincontent').height(snheight - 60);
} }
// Load Newsfeed
var ajax_load = "<div id='newsitem'>Loading newsfeed...</div>";
$("#newsfeeditems").html(ajax_load).load("lib/ajax.php?action=newsfeed", function() {
if ($("#newsfeeditems").html() != "") {
$("#newsfeed").slideDown();
}
});
// this is necessary for the special setting feature (ref #1010) // this is necessary for the special setting feature (ref #1010)
$.getQueryVariable = function(key) { $.getQueryVariable = function(key) {