Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buton = document.getElementById("stilizare");
- buton.onclick = function()
- {
- tag = document.getElementById("tag").value;
- var element = document.querySelectorAll(tag);
- buttonValue = document.querySelector('input[type="radio"]:checked').value;
- var i = 0;
- var final = element.length - 1;
- var intervalul = setInterval(function()
- {
- element[i].className = buttonValue;
- i++;
- if(i > final)
- {
- clearInterval(intervalul);
- }
- },1000)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement