mirror of
https://github.com/BreizhHardware/TD-R.git
synced 2026-01-18 16:47:34 +01:00
- Added exercise sheets for Bernoulli experiments including probability of success, failure, and simulation of multiple experiments. - Added exercise sheets for calculating integrals using different methods such as rectangles, Simpson's rule, and the integrate function. - Added exercise sheets for binomial distribution including probability calculations and cumulative probability. - Added exercise sheets for calculating the cardinality of sets including unique elements and empty sets.
60 lines
1.3 KiB
Plaintext
60 lines
1.3 KiB
Plaintext
// Essaie de fixer la div de menu lors d'un scrolling...
|
|
var afixer = document.getElementById("menuetsousmenu");
|
|
var adecaler = document.getElementById("main");
|
|
var position=afixer.offsetTop;
|
|
|
|
var afixerpub = document.getElementById("pubdroite");
|
|
var positionpub= afixerpub.offsetTop;
|
|
|
|
console.log(positionpub);
|
|
|
|
|
|
function scrolled(){
|
|
var windowHeight = window.innerHeight,
|
|
currentScroll = document.body.scrollTop || document.documentElement.scrollTop;
|
|
|
|
if (currentScroll>=position)
|
|
{
|
|
afixer.className = "fixed";
|
|
adecaler.className = "decale";
|
|
}
|
|
else
|
|
{
|
|
afixer.className="";
|
|
adecaler.className="";
|
|
}
|
|
|
|
// Ne fixer la pub que si la taille de l'écran est suffisante....
|
|
console.log(windowHeight);
|
|
|
|
if ( (currentScroll>=positionpub-100) && (windowHeight>=800) )
|
|
{
|
|
afixerpub.className="fixedpub";
|
|
}
|
|
else
|
|
{
|
|
afixerpub.className="";
|
|
}
|
|
}
|
|
|
|
addEventListener("scroll", scrolled, false);
|
|
/*
|
|
<script>
|
|
var positionElementInPage = $('#menu').offset().top;
|
|
$( window ).resize(function() {
|
|
positionElementInPage = $('#menu').offset().top;
|
|
});
|
|
$(window).scroll(
|
|
function() {
|
|
if ($(window).scrollTop() > positionElementInPage) {
|
|
// fixed
|
|
$('#menu').addClass("fixedTop");
|
|
} else {
|
|
// unfixed
|
|
$('#menu').removeClass("fixedTop");
|
|
}
|
|
}
|
|
|
|
);
|
|
</script>*/
|