Team:RHIT/Practice
From 2014.igem.org
(Difference between revisions)
Line 4: | Line 4: | ||
<head> | <head> | ||
<title>Home</title> | <title>Home</title> | ||
+ | <link href="https://2014.igem.org/Team:RHIT/StyleSheets/HomePage?action=raw&ctype=text/css" rel="stylesheet"> | ||
<style> | <style> | ||
#contentSub, #footer-box, #catlinks, #search-controls, #p-logo, .printfooter, .firstHeading,.visualClear {display: none;} /*-- hides default wiki settings --*/ | #contentSub, #footer-box, #catlinks, #search-controls, #p-logo, .printfooter, .firstHeading,.visualClear {display: none;} /*-- hides default wiki settings --*/ | ||
</style> | </style> | ||
+ | |||
+ | <script> | ||
+ | $(document).ready(function() { | ||
+ | //Display slider for Javascript users | ||
+ | $('#Slider').css('display', 'block'); | ||
+ | |||
+ | //Set height of slider (16/5 ratio) | ||
+ | $('#Slier').css('height', ($('body').width() / 3.2)); | ||
+ | |||
+ | //Position right/left arrows | ||
+ | var BarHeight= $('#Slider').height() - $('#BottomsLinks').height(); | ||
+ | $('#LeftBar, #RightBar').css('height', BarHeight); | ||
+ | $('#LeftArrow, #RightArrow').css('top', (BarHeight-60)/2); | ||
+ | |||
+ | //Repeat for window resize | ||
+ | $(window).resize(function() { | ||
+ | $('#Slider').css('height', ($('body').width() / 3.2)); | ||
+ | |||
+ | var BarHeight = $('#Slider').height() - $('#BottomLinks').height(); | ||
+ | $('#LeftBar, #RightBar').css('height', BarHeight); | ||
+ | $('#LeftArrow, #RightArrow').css('top', (BarHeight-60)/2); | ||
+ | }); | ||
+ | |||
+ | var TotalSlides = $('.Slides').length; | ||
+ | var CurrentSlide = 0; | ||
+ | |||
+ | $('#RightArrow').click(function() { | ||
+ | CurrentSlide = ++CurrentSlide % TotalSlides; | ||
+ | changeSlide(CurrentSlide); | ||
+ | }); | ||
+ | |||
+ | $('#LeftArrow').click(function() { | ||
+ | CurrentSlide = (CurrentSlide + TotalSlides - 1) % TotalSlides; | ||
+ | changeSlide(CurrentSlide); | ||
+ | }); | ||
+ | |||
+ | $('.SlideLink').click(function() { | ||
+ | var ClickedSlide = $(this).attr('id'); | ||
+ | CurrentSlide = parselnt(ClickedSlide.replace('Link', ")); | ||
+ | changeSlide(CurrentSlide); | ||
+ | }); | ||
+ | |||
+ | function changeSlide(num){ | ||
+ | var SlideID = '#Slide' + num; | ||
+ | $('.Slides').css('display', 'none'); | ||
+ | $(SlideID).css('display', 'block'); | ||
+ | } | ||
+ | }); | ||
+ | </script> | ||
</head> | </head> | ||
Line 16: | Line 66: | ||
<!-- menu --> | <!-- menu --> | ||
+ | <body> | ||
<table id="menu2" width="100%" cellspacing="0" style="background-color:#69221A;" height="140px"> | <table id="menu2" width="100%" cellspacing="0" style="background-color:#69221A;" height="140px"> | ||
Line 185: | Line 236: | ||
<!-- end of final block --> | <!-- end of final block --> | ||
+ | </body> | ||
</html> | </html> |
Revision as of 17:59, 23 June 2014
Welcome!
|
|
|
|
|
Here you can place the logos of your sponsors or other links! |