[jQuery] Re: Another image rollover question

2009-07-18 Thread leofromrio
After some more digging and basic research I was able to come up with this. I tried to work with .add/removeClass instead of .css, but couldn't get it to work the way I wanted to. This seems to work just fine: $(document).ready(function() { $(".btn.up").mouseover( fun

[jQuery] Re: Another image rollover question

2009-07-15 Thread leofromrio
Liam, Thank you very much for your input. That worked out perfectly! It also reduced the number of server requests by a few million. Like I said before, I'm sure the code could be written a lot better, but here it is anyway: $(function() { // image hover $(".topmenu div")

[jQuery] Re: Another image rollover question

2009-07-15 Thread Liam Byrne
For something like this, you'd be best off having all 4 states of the button in a single graphic file, one under the other, and using the background-position to control it. The image would be 4 times as big as the allocated div or li, with only a quarter of it showing at a time depending on