Hi, I have three li tags and each has a unique Id and I am trying to associate each with a different image. On hover, on a given li the image for that li will be shown by appending the image to a div. Let us say there was no unique id .... is it possible to associate a different images with each li tag ?
Any ideas ?
<script type="text/javascript">
$(document).ready(function() {
var img1 = new Image();
$(img1).attr('src', 'images/img1.jpg');
$("li").hover(
function(){
$('#articleimage').append(img1);
}
);
});
</script>
</head>
<body>
<div id="parent" style="width:560px">
<div id="articlelist" style="float:left; width:210px">
<ul id="newslist" >
<li id="1">Todays world<img src='images/more.jpg'/></li>
<li id="2">Connecting the world<img src='images/more.jpg'/></li>
<li id="3">Evolution of data storage<img src='images/more.jpg'/></li>
</ul>
</div>
<div id="articleimage" style="float:right; width:350px">
</div>
</div>