I have nested stucture of div something like this:
<div id="main">
<div class = "container">
- - - - -
- - - - -
<div id="abc">
- - - -
- - - -
<div classs="me">
<ul>
<li>
<a href="../02/1.jpg" class="preview" title="Lake and a mountain">
<img src="../02/1s.jpg" alt="gallery thumbnail" />
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
now how can I access anchor on hover in jquery , I write somthing like this:
$("a.preview").hover(function(e){
this.t = this.title;
this.title = "";
var c = (this.t != "") ? "<br/>" + this.t : "";
$("div.me").append("<p id='previewcss'><img src='"+ this.href +"' alt='Image preview' />"+ c +"</p>");
$("#previewcss")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.fadeIn("fast");
},
function(){
this.title = this.t;
$("#previewcss").remove();
});