[jQuery] Re: how to preserve the image that was there when I roll over

2008-04-29 Thread A13thGuest
you may be able to cache the images to get what you want here's an untested crack at it, hopefully it will get you close: $(document).ready(function(){ imgGreen = new Image(15,15); imgGreen.src = 'images/Green.gif'; imgYellow = new Image(15,15); imgYellow.src = 'images/Yellow.gi

[jQuery] Re: how to preserve the image that was there when I roll over

2008-04-29 Thread Karl Swedberg
Hi Dave, You can store the initial src in a variable and use that later. Also, you might find the .hover() method helpful here: var mysrc = ''; $('.myClass').hover(function() { mysrc = $(this).attr('src'); $(this).attr('src', 'over.gif') }, function() { $(this).attr('src', mysrc); });

[jQuery] Re: how to preserve the image that was there when I roll over

2008-04-29 Thread howa
On 4月30日, 上午10時41分, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I have several images on my page, each with class "myClass". I know > when I roll over each image, I want its source to be "over.gif". > However, when I roll out I want the image to be whatever was there > before, and