SMT-for-IN3070/js/script.js
2019-11-19 19:46:07 +01:00

17 lines
531 B
JavaScript

function blurPython() {
blocksToBlur = document.getElementsByClassName('src-python');
// Note: Skipping the two first code blocks
for (var i = 1; i < blocksToBlur.length; i++) {
const block = blocksToBlur[i]
block.setAttribute("style", "cursor: pointer;");
block.classList.toggle("blur");
block.addEventListener("click", function () {
block.classList.toggle("blur");
});
}
}
document.addEventListener('DOMContentLoaded', function(){
blurPython();
}, false);