Hello.
I'd like to load 3 html files (file1.html, file2.html and file3.html) after onmouseover on one of 3 divs. However, it always loads only file1.html (basing on first div from the top). What am I doing wrong?
Code:
- <html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="./jquery.min.js"></script>
<style type="text/css">
.mOver{
border:1px solid #000000;
width: 120px;
text-align: center;
float: left;
margin-right: 10px;
}
</style>
</head>
<body>
<div class="mOver" name="file1" >LOAD F1</div>
<div class="mOver" name="file2" >LOAD F2</div>
<div class="mOver" name="file3" >LOAD F3</div>
<br clear="all" /><br />
<div id="LoadHere"></div>
<script>
$("div.mOver").mouseover(function() {
var Name = $("div").attr("name");
$("#LoadHere").load(Name + ".html");
});
</script>
</body>
</html>
Thanks!