Biomod/2012/OSU/OhioMOD: Difference between revisions
No edit summary |
No edit summary |
||
| Line 52: | Line 52: | ||
if (window.innerHeight<800) {winH = 800;} | if (window.innerHeight<800) {winH = 800;} | ||
} | } | ||
alert(winW); | |||
$(document).ready(function(){ | $(document).ready(function(){ | ||
Revision as of 17:10, 22 October 2012
<html> <head> <link rel="stylesheet" href="http://dl.dropbox.com/s/m67naltf0bualg0/main.css" type="text/css" media="screen" /> <link rel="stylesheet" href="http://dl.dropbox.com/s/y6lp9909xs10md7/flexslider.css" type="text/css" media="screen" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <script type="text/javascript" src="http://dl.dropbox.com/s/piaqef6ntvm0hnn/jquery.queryloader2.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="http://dl.dropbox.com/s/osh1gymcc7eyddv/jquery.pagescroller.lite.js"></script> <script src="http://dl.dropbox.com/s/3ej7jws4d4r4stu/jquery.flexslider-min.js"></script> <script src="http://dl.dropbox.com/s/ii3bdcd8mydr89k/jquery.flexslider.js"></script> <script type="text/javascript" src="http://dl.dropbox.com/s/piaqef6ntvm0hnn/jquery.queryloader2.js"></script>
<script type"text/javascript">
$(window).load(function(){
$('.flexslider').flexslider({
animation: "slide",
controlNav: "thumbnails"
});
});
$(document).ready(function () {
$("body").queryLoader2({barColor: "#FFF",backgroundColor: "#000",percentage: true,barHeight: 1,completeAnimation: "grow",minimumTime: 100}); $("style").remove(); $('head').append('<link rel="stylesheet" href="/skins/monobook/shared.css?164" type="text/css" />'); $("#sidebar-main").remove(); $(".portlet").remove(); $("#contentSub").remove(); $("#jump-to-nav").remove(); $("#siteSub").remove(); $(".firstHeading").remove(); $("#footer").remove(); $(".printfooter").remove(); }); </script>
<script type="text/javascript">
var winW = 800, winH = 600; if (document.body && document.body.offsetWidth) {
winW = document.body.offsetWidth; winH = document.body.offsetHeight;
} if (document.compatMode=='CSS1Compat' &&
document.documentElement &&
document.documentElement.offsetWidth ) {
winW = document.documentElement.offsetWidth;
winH = document.documentElement.offsetHeight;
} if (window.innerWidth && window.innerHeight) {
winW = window.innerWidth;
winH = window.innerHeight;
if (window.innerHeight<800) {winH = 800;}
}
alert(winW);
$(document).ready(function(){
// initiate page scroller plugin $('body').pageScroller({ navigation: '#nav' });
$(".section").height(winH); $('#team_slider').width(winW-450); $('header').height(winH-44); document.getElementById('frontvar').style.paddingTop =(winH/3-22)+"px";
//Calculate the height of <header> //Use outerHeight() instead of height() if have padding
var aboveHeight = winH-22;//$('header').height()+1050;
// when scroll
$(window).scroll(function(){
//if scrolled down more than the header's height
if ($(window).scrollTop() > aboveHeight){
// if yes, add "fixed" class to the <nav> // add padding top to the #content (value is same as the height of the nav)
$('nav').addClass('fixed').css('top','0').next().css('padding-top','60px');
} else {
// when scroll up or less than aboveHeight, remove the "fixed" class, and the padding-top
$('nav').removeClass('fixed').next().css('padding-top','0px');
}
});
// for the window resize $(window).resize(function() { var winW = 800, winH = 600; if (document.body && document.body.offsetWidth) {
winW = document.body.offsetWidth; winH = document.body.offsetHeight;
} if (document.compatMode=='CSS1Compat' &&
document.documentElement &&
document.documentElement.offsetWidth ) {
winW = document.documentElement.offsetWidth;
winH = document.documentElement.offsetHeight;
} if (window.innerWidth && window.innerHeight) { winH = window.innerHeight;
winW = window.innerWidth;
if (window.innerHeight<800) {winH = 800;}
}
$(".section").height(winH);
$('header').height(winH-44); $('#team_slider').width(winW-550); document.getElementById('frontvar').style.paddingTop =(winH/3-22)+"px";
//Calculate the height of <header> //Use outerHeight() instead of height() if have padding
var aboveHeight = winH-44;//$('header').height()+1050;
// when scroll
$(window).scroll(function(){
//if scrolled down more than the header's height
if ($(window).scrollTop() > aboveHeight){
// if yes, add "fixed" class to the <nav> // add padding top to the #content (value is same as the height of the nav)
$('nav').addClass('fixed').css('top','0px').next().css('padding-top','60px');
} else {
// when scroll up or less than aboveHeight, remove the "fixed" class, and the padding-top
$('nav').removeClass('fixed').next().css('padding-top','00px');
}
});
});
});
</script>
</head>
<body> <header>
<img id="frontvar" src="http://dl.dropbox.com/s/5ye82pz6sieqlzy/front_logo.jpg"/>
</header>
<nav>
</nav>
Background
Project
Methods
Results/Discussion
Resources
The Team
</html>