I had noticed that, but wasn't going to mention it because in IE it does the same thing. IE 9 that is. But I figured you might be using IE 8 so I checked in IE 9 using its IE 8 mode. The same thing still happened. So I figured you were OK with that. This will happen in IE 9, Firefox, Chrome, Safari, etc.
But after reading your most recent post, I fired up my virtual machine where I have a real IE 8. There it worked like you say. Apparently only IE 8 is doing what you want.
To correct this problem, we need to get rid of the image maps and use a different rollover function. Also I notice that the page is using 2 versions of jQuery where only one is required.
So, step by step -
Change this as shown (highlighted and red):
Code:
<title>Avajang ICT Group Website - وب سایت گروه شركت*هاي آواژنگ </title>
<link rel="stylesheet" type="text/css" href="data/stylesheets/layout.css">
<link rel="stylesheet" type="text/css" href="data/stylesheets/define.css">
<link rel="stylesheet" type="text/css" href="data/stylesheets/formSkinning.css">
<script type="text/javascript" language="JavaScript1.2" src="data/SpryAssets/_pgtres/stm31.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript" src="data/SpryAssets/fadeslideshow.js"></script>
<script type="text/javascript" src="data/SpryAssets/gradualfader.js">
Get rid of this (highlighted):
Code:
. . . imeout(delayhide)
}
if (ie5||ns6)
document.onclick=hidemenu
</script>
<link rel="stylesheet" type="text/css" href="data/stylesheets/popupmenu.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="data/SpryAssets/popupmenu.js">
/***********************************************
* Image Menu - Products Icons
***********************************************/
</script>
<script type="text/javascri . . .
Get rid of this (highlighted):
Code:
. . . uage="javascript" type="text/javascript">
persianstat(10039870, 0);
</script>
<!-- /PersianStat -->
<script type="text/javascript">
//Following function should be called at the end of the page:
imagerollover()
</script>
</p>
</body>
</html>
Change your data/SpryAssets/imagerollover.js file to this:
Code:
jQuery(function($){
var allimages = $('img[data-over]').mouseenter(function(){
this.src = this.getAttribute('data-over');
}).mouseleave(function(e){//alert(e.relatedTarget);
this.src = this.getAttribute('data-out');
}).each(function(){
var $this = $(this);
$(new Image()).attr('src', $this.attr('data-over'));
$('#' + $this.parent().attr('data-popupmenu')).hover(function(){
$this.trigger('mouseenter');
}, function(){
$this.trigger('mouseleave');
});
});
});
And replace each of the 16 these (leading spaces and tabs removed, so it will be viewable in the code block):
HTML Code:
<map name="FPMap0">
<area href="#" shape="rect" coords="5, 2, 37, 30" data-popupmenu="popmenu1">
</map>
<img border="0" src="data/images/icon/product_mb_logo.gif" data-over="data/images/icon/product_mb_over_logo.gif" data-out="data/images/icon/product_mb_logo.gif" usemap="#FPMap0" />
with one of these:
HTML Code:
<a href="#" data-popupmenu="popmenu1">
<img border="0" src="data/images/icon/product_mb_logo.gif" data-over="data/images/icon/product_mb_over_logo.gif" data-out="data/images/icon/product_mb_logo.gif" /></a>
Don't miss adding the trailing </a> tag after each image. make sure to preserve the unique data-popmenu attribute for each link as well as the src, data-over and data-out attributes for each image.
That's it, and it still works in IE 8. And should now work in all others as well (tested in the real IE 8, IE 9 Opera, Firefox, and Chrome). And it doesn't hurt the other rollovers that use the rollover code.
Bookmarks