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,6 +25,15 @@ $(document).ready(function() {
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
var snheight = $('#sidenavigation').height();
var mainheight = $('#maincontent').height();
@@ -32,14 +41,6 @@ $(document).ready(function() {
$('#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)
$.getQueryVariable = function(key) {
var urlParams = decodeURI( window.location.search.substring(1) );