$(function() { document.getElementById("JPG1").onmouseover = function() { $("[name=NameJPG]").each( function(n, item) { item.style.display = "none"; } ); } });