Sarah igem (Talk | contribs) |
Sarah igem (Talk | contribs) |
||
Line 3: | Line 3: | ||
$('#intro').toogleClass('hidden'); | $('#intro').toogleClass('hidden'); | ||
$('#maindesc').toogleClass('visible'); | $('#maindesc').toogleClass('visible'); | ||
+ | }); | ||
+ | $("[data-fancybox]").fancybox({ | ||
+ | iframe : { | ||
+ | preload : false, | ||
+ | css : { | ||
+ | width: '860px', | ||
+ | height: '580px' | ||
+ | } | ||
+ | } | ||
}); | }); | ||
Revision as of 14:02, 15 October 2018
$(document).ready(function() { $('.discover').click(function() { $('#intro').toogleClass('hidden'); $('#maindesc').toogleClass('visible'); }); $("[data-fancybox]").fancybox({ iframe : { preload : false, css : { width: '860px', height: '580px' } } });
});
$(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')
}
});