Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

hover con js

// Creamos el evento mouseover para cada imagen
	imagenes[i].addEventListener("mouseover", function(e){
		document.getElementById("mostrar").style.backgroundImage="url('"+e.target.currentSrc+"')";
	});
 
// Creamos el evento mouseout para cada imagen
imagenes[i].addEventListener("mouseout", function(e){
  document.getElementById("mostrar").style.backgroundImage="";
});
Source by www.lawebdelprogramador.com #
 
PREVIOUS NEXT
Tagged: #hover #js
ADD COMMENT
Topic
Name
1+2 =