Hi,
The following JQuery script works fine for Chrome and Firefox but doesn’t work for IE. Why is that?
here is the relevant source code:
[code=html]
<script src=”../AssafModules/Category Menu/jquery-1.3.1.min.js” type=”text/javascript”></script>
<script src=”../AssafModules/Category Menu/jquery.backgroundPosition.js” type=”text/javascript”></script>
<script type=”text/javascript”>
$(document).ready(function () {
$(‘#ver li a’).hover(
function () {
width = $(this).width() * (-1);
$(this).stop().animate({ ‘backgroundPosition’: ‘(‘ + width + ‘ 0)’ }, { duration: 200 });
},
function () {
$(this).stop().animate({ ‘backgroundPosition’: ‘(0 0)’ }, { duration: 200 });
}
);
$(‘#hor li a’).hover(
function () {
height = $(this).height() * (-1);
$(this).stop().animate({ ‘backgroundPosition’: ‘(0 ‘ + height + ‘)’ }, { duration: 200 });
},
function () {
$(this).stop().animate({ ‘backgroundPosition’: ‘(0 0)’ }, { duration: 200 });
}
);
});
</script>
<div class=”navigate-bottom-border”></div>
<script type=”text/javascript”>
$(document).ready(function () {
$(‘#ver li a’).hover(
function () {
width = $(this).width() * (-1);
$(this).stop().animate({ ‘backgroundPosition’: ‘(‘ + width + ‘ 0)’ }, { duration: 200 });
},
function () {
$(this).stop().animate({ ‘backgroundPosition’: ‘(0 0)’ }, { duration: 200 });
}
);
$(‘#hor li a’).hover(
function () {
height = $(this).height() * (-1);
$(this).stop().animate({ ‘backgroundPosition’: ‘(0 ‘ + height + ‘)’ }, { duration: 200 });
},
function () {
$(this).stop().animate({ ‘backgroundPosition’: ‘(0 0)’ }, { duration: 200 });
}
);
});
</script>
<div style=”padding-right:10px;padding-top:10px;”>
<ul id=”ver”>
<li><a href=”http://stereoshackn.co.il/category/56-.aspx” class=”receivers”></a></li>
<li><a href=”http://stereoshackn.co.il/category/56-.aspx” class=”speakers”></a></li>
<li><a href=”http://stereoshackn.co.il/category/56-.aspx” class=”homeCinema”></a></li>
</ul>
</div>