Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
    <img src = "https://www.muralesyvinilos.com/murales/p/arbol_y_paisaje_muralesyvinilos_2908671__XXL.jpg" class = "cambia" />
    <img src = "http://senegami.com/wp-content/uploads/2014/04/Naturaleza-y-Paisajes-e1397931974712-250x200.jpg" class = "cambia" />
    <a href = "hhtp://www.google.com" target = "_blank" class = "cambia">
        <img src = "http://www.pagina12.com.ar/2001/suple/Turismo/01-06/01-06-24/nota1a.jpg" />
    </a>
</body>
</html>
 
.cambia{
    position: absolute;
    display: none;
}
 
var cambia = document.querySelectorAll(".cambia");
cambia[0].style.display = "block";
cambia[0].addEventListener("click", function(){
    this.style.display = "none";
    cambia[1].style.display = "block";
    setTimeout(function(){
        cambia[1].style.display = "none";
        cambia[2].style.display = "block";
    }, 3000);
}, false);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
Alexis88pro
0viewers