Sarah igem (Talk | contribs) |
Sarah igem (Talk | contribs) |
||
Line 4: | Line 4: | ||
$('#maindesc').toogleClass('visible'); | $('#maindesc').toogleClass('visible'); | ||
}); | }); | ||
− | $("[data-fancybox]").fancybox({ | + | |
− | hideOnContentClick: true, | + | $("[data-fancybox]").fancybox({ |
− | toolbar : false, | + | hideOnContentClick: true, |
− | + | toolbar : false, | |
− | + | smallBtn : true, | |
− | + | iframe : { | |
− | css : { | + | preload : false, |
+ | css : { | ||
width: '860px', | width: '860px', | ||
− | height: ' | + | height: '580px', |
+ | max-width : '80%', | ||
+ | max-height : '80%', | ||
+ | margin: '0' | ||
} | } | ||
− | + | } | |
− | + | ||
}); | }); | ||
− | |||
}); | }); | ||
Revision as of 13:58, 15 October 2018
$(document).ready(function() { $('.discover').click(function() { $('#intro').toogleClass('hidden'); $('#maindesc').toogleClass('visible'); });
$("[data-fancybox]").fancybox({ hideOnContentClick: true, toolbar : false, smallBtn : true, iframe : { preload : false, css : { width: '860px', height: '580px', max-width : '80%', max-height : '80%', margin: '0' } } }); });
$(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')
}
});