richiewilmot
asked on
Jquery addClass
Hello All,
Can anyone help me out with a little jquery below, I know this isn't the right way but you should be able to tell what I'm trying to achive.
I have four images, I need three of the classes to change when I roll over an image.
If anyone knows how I can fade the effect it would be even better!
<script type="text/javascript">
$("img#front-image-one").h over(funct ion() {
$("img#front-image-two").a ddClass("h over");
$("img#front-image-three") .addClass( "hover");
$("img#front-image-four"). addClass(" hover");
},
function () {
$("img#front-image-two").r emoveClass ("hover");
$("img#front-image-three") .removeCla ss("hover" );
$("img#front-image-four"). removeClas s("hover") ;
});
</script>
Can anyone help me out with a little jquery below, I know this isn't the right way but you should be able to tell what I'm trying to achive.
I have four images, I need three of the classes to change when I roll over an image.
If anyone knows how I can fade the effect it would be even better!
<script type="text/javascript">
$("img#front-image-one").h
$("img#front-image-two").a
$("img#front-image-three")
$("img#front-image-four").
},
function () {
$("img#front-image-two").r
$("img#front-image-three")
$("img#front-image-four").
});
</script>
<script type="text/javascript">
$("img#front-image-one").hover(function() {
$("img#front-image-two").addClass("hover");
$("img#front-image-three").addClass("hover");
$("img#front-image-four").addClass("hover");
},
function () {
$("img#front-image-two").removeClass("hover");
$("img#front-image-three").removeClass("hover");
$("img#front-image-four").removeClass("hover");
});
</script>
ASKER
it doesn't do anything?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What about this code isn't working for you?