Comment ajouter un Onmouseout
hichamdeb
Messages postés
137
Statut
Membre
-
katsuo49 Messages postés 362 Statut Membre -
katsuo49 Messages postés 362 Statut Membre -
Bonjour
cela fait 2 jours que je me creuse la tête en vain! c'est assez banale comme question mais il faut dire que je suis pas très douer en JS :p
Je voudrai rajouter un onmouseout quelque part sur mon code afin de rajouter le code suivant "min-width:310px;" sur le code css
code initial
AVEC ONMOUSEOUT
Voici Mon code
cela fait 2 jours que je me creuse la tête en vain! c'est assez banale comme question mais il faut dire que je suis pas très douer en JS :p
Je voudrai rajouter un onmouseout quelque part sur mon code afin de rajouter le code suivant "min-width:310px;" sur le code css
code initial
background: url(images/1.jpg) repeat scroll 0%; width:310px;
AVEC ONMOUSEOUT
background: url(images/1.jpg) repeat scroll 0%; width:310px; min-width:310px;
Voici Mon code
<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>
A voir également:
- Comment ajouter un Onmouseout
- Ajouter un profil netflix payant - Accueil - Guide streaming
- Comment ajouter un compte facebook - Guide
- Impossible d'ajouter un ami sur facebook - Guide
- Ajouter un compte whatsapp - Guide
- Ajouter liste déroulante excel - Guide