Team:Heidelberg/Templates/Footer
From 2013.igem.org
(Difference between revisions)
Nils.kurzawa (Talk | contribs) m |
Nils.kurzawa (Talk | contribs) m |
||
Line 9: | Line 9: | ||
$('#myCarousel').carousel({interval: O}); | $('#myCarousel').carousel({interval: O}); | ||
$('div').scrollspy({ target: '#navbarExample' }); | $('div').scrollspy({ target: '#navbarExample' }); | ||
+ | |||
+ | //script for showing only 3 months | ||
+ | $($('.month_tab').slice(3)).hide(); | ||
+ | $(function() { | ||
+ | $('#forwards').click(function(e) { | ||
+ | var visible = $('.month_tab:visible'); | ||
+ | var next = $(visible[visible.length - 1]).next('.month_tab'); | ||
+ | if (next.length > 0) { | ||
+ | $(visible[0]).hide(); | ||
+ | next.show(); | ||
+ | } | ||
+ | e.preventDefault(); | ||
+ | }); | ||
+ | $('#backwards').click(function(e) { | ||
+ | var visible = $('.month_tab:visible'); | ||
+ | var prev = $(visible[0]).prev('.month_tab'); | ||
+ | if (prev.length > 0) { | ||
+ | $(visible[visible.length - 1]).hide(); | ||
+ | prev.show(); | ||
+ | } | ||
+ | e.preventDefault(); | ||
+ | }); | ||
+ | }); | ||
</script> | </script> | ||
</html> | </html> |
Revision as of 11:56, 23 September 2013