On Jun 9, 11:56 am, simon <si...@uvfx.tv> wrote:
> this works fine but gives me a lot of jquery code as well for each as
> i also have a click action after it, but thats another matter, what i
> am after is if i just give it the same id as below  then i would like
> only to have one hover code that would do the effect to all, but at mo
> it will only do the effect to the first, any ideas?
>

You can't have more than one element with a given id in HTML (see
<http://www.w3.org/TR/html401/struct/global.html#adef-id>).

Give your buttons a class:

<img src="button.jpg" alt="button"  border="0" id="myButton99"
class="fade"/>

and select them by that instead:

$(document).ready(function(){
$(".fade").hover(
      function () {
        $(this).fadeTo('fast', .50);
      },
      function () {
        $(this).fadeTo('fast', 1.0);
      }
    );

});

HTH,

Nick.
--
Nick Fitzsimons
http://www.nickfitz.co.uk/

Reply via email to