Question : 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").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>
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
<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>

Answer : Jquery addClass

I changed the " for ' and it works, thanks for your help!
Random Solutions  
 
programming4us programming4us