Sarah igem (Talk | contribs) |
Sarah igem (Talk | contribs) |
||
Line 1: | Line 1: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
$('.discover').click(function() { | $('.discover').click(function() { | ||
− | $('#intro'). | + | $('#intro').toogleClass('hidden'); |
− | $('#maindesc'). | + | $('#maindesc').toogleClass('visible'); |
+ | }); | ||
+ | |||
+ | $(".fancybox").fancybox({ | ||
+ | 'width' : 900, | ||
+ | 'height' : 600, | ||
+ | 'type' : 'iframe' | ||
}); | }); | ||
}); | }); |
Revision as of 09:36, 15 October 2018
$(document).ready(function() { $('.discover').click(function() { $('#intro').toogleClass('hidden'); $('#maindesc').toogleClass('visible'); });
$(".fancybox").fancybox({ 'width' : 900, 'height' : 600, 'type' : 'iframe' }); });
$(window).scroll(function() {
var hT = $('#scroll-to').offset().top,
hH = $('#scroll-to').outerHeight(), wH = $(window).height(), wS = $(this).scrollTop();
if (wS > (hT+hH-wH) && (hT > wS) && (wS+wH > hT+hH)){
$('h1').addClass('view')
} else {
$('h1').removeClass('view')
}
});