document.write('
'); $.fn.center = function () { this.css("position","absolute"); this.css("z-index","10000000"); this.css("position","fixed"); this.css("top", ( $(window).height() - this.height() ) / 2 + "px"); this.css("left", ( $(window).width() - this.width() ) / 2 + "px"); $("#seitezeigen").height($(window).height()); $("#seitezeigen").width($(window).width()); return this; } $(".ladebalken").center(); // Bind to the resize event of the window object $(window).on("resize", function () { $(".ladebalken").center(); // Invoke the resize event immediately }).resize();