... newer stories
Dienstag, 10. Dezember 2013
jQuery.fn.centerFix = function () { this.css("position","absolute"); this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px"); this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px"); return this; } $('.div').centerFix();Via der-webentwickler.net
Tags: jQuery, zentrieren
Kategorie: programmierung
... older stories