0

Autor: zum2001 | Kategorija: Uncategorized

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

function init() { if(document.getElementsByClassName('custom_page')[0] && document.getElementsByClassName('custom_page')[0].getElementsByTagName('img').length >= 1) { document.getElementsByClassName('custom_page')[0].getElementsByTagName('img')[0].style.display="none"; } function boja() { if(document.getElementById('Image_and_text_container').scrollTop == 0) { document.getElementById('Menu_container').style.backgroundColor = '#CCCA14' } else { document.getElementById('Menu_container').style.backgroundColor = 'rgba(204, 202, 20, 0.8)'; } } function pokaziIzbornik() { document.getElementById("Modal_window").style.cssText = "transform: translate3d(0, 0, 0);" document.getElementById("Menu_items").style.animation = "animiraj 0.6s forwards"; document.getElementById("Container").style.overflow = "hidden"; } function sakrijIzbornik() { document.getElementById("Modal_window").removeAttribute('style'); document.getElementById("Menu_items").removeAttribute('style'); document.getElementById("Container").removeAttribute('style'); } function lightImages() { if(document.getElementsByClassName('Post_ili_page_text')[0]){ var num; var images = document.getElementsByClassName('Post_ili_page_text')[0].getElementsByTagName('img'); for (num = 0; images.length > num; num++) { //var a_tag = document.createElement("A"); //document.getElementsByClassName('Post_ili_page_text')[0].appendChild(a_tag); //a_tag.href = images[num].src; //a_tag.className = "lightBox"; //a_tag.appendChild(images[num]); } } } //lightImages(); document.getElementById("Icon").addEventListener("click", pokaziIzbornik) document.getElementById("Modal_window").addEventListener("click", sakrijIzbornik) //document.getElementById('Image_and_text_container').addEventListener('scroll', boja) } window.addEventListener('DOMContentLoaded', init);