SMT-for-IN3070/js/script.js

17 lines
531 B
JavaScript
Raw Normal View History

2019-11-19 18:46:07 +00:00
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);