fade In a div when hover on an imagemap
hello, I have an imagemap, I want to when mouse over on a hot spot a div with some information about that place fade in and with mouse leave it fade out. my html page is below:
- <div id="content">
- <img src="382525_CMQTqaMx.gif" alt="" />
- <map id="map">
- <area shape="circle" coords="100,200,20" alt="" class="hotspot" />
- <div class="projects">
- <a>project 1</a>
- <a>project 2</a>
- </div>
- <area shape="circle" coords="200,300,20" alt="" class="hotspot" />
- <div class="projects">
- <a>project 3</a>
- <a>project 4</a>
- <a>project 5</a>
- </div>
- <area shape="circle" coords="400,200,20" alt="" class="hotspot" />
- <div class="projects">
- <a>project 6</a>
- <a>project 7</a>
- <a>project 8</a>
- </div>
- <area shape="circle" coords="300,400,20" alt="" class="hotspot" />
- <div class="projects">
- <a>project 9</a>
- <a>project 10</a>
-
- </div>
- </map>
-
- </div>
and the css and jquery is below,
- <style type="text/css">
- .projects
- {
- display:none;
-
- }
- .hotspot
- {background-color:Red;}
- </style>
- <script type="text/javascript">
- $(function () {
- $('.hotspot').each(function () {
- $(this).hover(
- function () {
- $('.projects').fadeIn(slow);
- },
- function () {
- $('.projects').fadeOut(slow);
- })
- });
- });
- </script>
it will help me alot if any body help about this.