Team:UCLondon/Templates/Team-Style

From 2012e.igem.org

(Difference between revisions)
Line 95: Line 95:
<script>
<script>
-
jQuery.fn.center = function () {
 
-
    this.css("position","absolute");
 
-
    this.css("top", Math.max(0, (($(window).height() - this.outerHeight()) / 2) +
 
-
                                                $(window).scrollTop()) + "px");
 
-
    this.css("left", Math.max(0, (($(window).width() - this.outerWidth()) / 2) +
 
-
                                                $(window).scrollLeft()) + "px");
 
-
    return this;
 
-
}
 
Line 108: Line 100:
$('.team li').click(function(event) {
$('.team li').click(function(event) {
-
   $('#shadow').center();
+
   $('#shadow').css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");

Revision as of 05:30, 17 September 2012