bhuvanasanthi
Programmer
<script type='text/javascript'>
$(window).load(function () {
$('area').each(function (e) {
var area = $(this),
alt = area.attr('id');
if (alt != null) {
area.mouseenter(function () {
var newImage = $('<img />');
newImage.attr('src', 'ReadImage.ashx?id=' + alt); // call handler with id
$('.display').append(newImage);
};
}
e.preventDefault();
});
});
</script>
<div class="display">
</div>
<img src="3rd_Floor_screen-size.jpg" width="1372" height="906" border="0" alt="" usemap="#Map" /></div>
<map name="Map" id="Map">
<area id="1" alt="1" class="tooltip" shape="rect" coords="28, 87, 93, 181" href="#"/>
<area id="2" alt="2" class="tooltip" shape="rect" coords="95, 91, 172, 158" href="#"/>
<area id="3" alt="3" class="tooltip" shape="rect" coords="175, 90, 225, 157" href="#"/>
</map>
I am gettting image on mouseover, if i over the mouse on area id =1.
That id 1 will be passed to the ashx page through the script.
The ashx page returns my image from the database.
I am loading that image in the div display.
Now what i need is i have to display the image as a tooltip not in a div........
For example: Visit this following website.
Can anybody suggest me a solution to do this?
I know there is an easy way to do this...... i have brought 60 percent. Now what i need is i have to get this image as a tooltip when i move the mouse over the area id =1..
Thanks
$(window).load(function () {
$('area').each(function (e) {
var area = $(this),
alt = area.attr('id');
if (alt != null) {
area.mouseenter(function () {
var newImage = $('<img />');
newImage.attr('src', 'ReadImage.ashx?id=' + alt); // call handler with id
$('.display').append(newImage);
};
}
e.preventDefault();
});
});
</script>
<div class="display">
</div>
<img src="3rd_Floor_screen-size.jpg" width="1372" height="906" border="0" alt="" usemap="#Map" /></div>
<map name="Map" id="Map">
<area id="1" alt="1" class="tooltip" shape="rect" coords="28, 87, 93, 181" href="#"/>
<area id="2" alt="2" class="tooltip" shape="rect" coords="95, 91, 172, 158" href="#"/>
<area id="3" alt="3" class="tooltip" shape="rect" coords="175, 90, 225, 157" href="#"/>
</map>
I am gettting image on mouseover, if i over the mouse on area id =1.
That id 1 will be passed to the ashx page through the script.
The ashx page returns my image from the database.
I am loading that image in the div display.
Now what i need is i have to display the image as a tooltip not in a div........
For example: Visit this following website.
Can anybody suggest me a solution to do this?
I know there is an easy way to do this...... i have brought 60 percent. Now what i need is i have to get this image as a tooltip when i move the mouse over the area id =1..
Thanks