Team:Peking/js/inside.js

From 2014.igem.org

(Difference between revisions)
Line 1: Line 1:
$(document).ready(function(){
$(document).ready(function(){
-
var hei=$("#insidemid ").height()-40;
+
var hei=$("#insidemid ").height();
$("#sidenav").css( "height", hei
$("#sidenav").css( "height", hei
);
);

Revision as of 03:26, 14 October 2014

$(document).ready(function(){

var hei=$("#insidemid ").height(); $("#sidenav").css( "height", hei );


$("#list").pin({ containerSelector: "#sidenav" });

jumpupposition(); $('#jumpup').hover(function(){ $("#jumpup img").attr({"src":"Peking2014wcg_jumpupchoose.png"});

                           },function(){

$("#jumpup img").attr({"src":"Peking2014wcg_jumpup.png"}); }); $('#jumpdown').hover(function(){ $("#jumpdown img").attr({"src":"Peking2014wcg_jumpdownchoose.png"});

                     },function(){

$("#jumpdown img").attr({"src":"Peking2014wcg_jumpdown.png"});

                       		 });

});



function jumpupposition() { var right=($("body").width()-$("#mainbody").width())/2-80;

 		if(right<0){
 		    right=0;
               }
 		$("#jumpup").css('right',right);

$("#jumpdown").css('right',right); //alert(right);

};