Hi
you cannot have multiple ids ids are unique you need to use a class name
instead
.
img src=button.jpg alt=button border=0 id=myButton
class=hoverbutton/
end loop
So only this loops and i only need the code below once.
$(document).ready(function(){
$(img.hoverbutton).hover(
function ()
Why not use a class instead of an id in order to target all buttons?
Or alternatively something like:
$('img[alt=button]').hover(
function () {
$(this).fadeTo('fast', .10);
},
function () {
$(this).fadeTo('fast', 1.0);
}
);
Maurício
-Mensagem
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
I hope this helps:
script
$(document).ready(function(){
$(#menubar *).mouseover(function () {
$(this).fadeTo(slow, 0.33);
});
$(#menubar *).mouseout(function () {
$(this).fadeTo(slow, 1);
});
});
/script
thanks everyone, thats great to here from all the suggestions will
give it a go.
Much appreciated
Si
5 matches
Mail list logo