1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
<style type="text/css">
.jimgMenu ul li.landscapes a {
background: url(images/1.jpg) repeat scroll 0%;
width:310px;
min-width:310px;
}
.jimgMenu ul li.people a {
background: url(images/2.jpg) repeat scroll 0%;
}
.jimgMenu ul li.nature a {
background: url(images/3.jpg) repeat scroll 0%;
}
.jimgMenu ul li.abstract a {
background: url(images/4.jpg) repeat scroll 0%;
}
</style>
<!--[if IE]>
<style type="text/css">.jimgMenu {position:relative;width:555px;height:160px;overflow:hidden;margin-left:0px;}</style>
<![endif]-->
<script type="text/javascript">
$(document).ready(function () {
// find the elements to be eased and hook the hover event
$('div.jimgMenu ul li a').hover(function() {
// if the element is currently being animated (to a easeOut)...
if ($(this).is(':animated')) {
$(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad"});
} else {
// ease in quickly
$(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad"});
}
}, function () {
// on hovering out, ease the element out
if ($(this).is(':animated')) {
$(this).stop().animate({width: "60px"}, {duration: 400, easing:"easeInOutQuad"})
} else {
// ease out slowly
$(this).stop('animated:').animate({width: "60px"}, {duration: 450, easing:"easeInOutQuad"});
}
});
});
</script> |
Partager