![]() |
JQuery Rollover Button Slow!
Hi, I have created a navigation menu with images. So my code is here for one button image when hover, it changes to another image:
$(document).ready (function () { $('.button').hover (function () { $(this).attr ('src', 'image1.jpg');}, function () { $(this).attr ('src', 'image.jpg'); }); }); The hover works perfectly, but it is taking about 3 seconds to take effect, why? |
maybes it's not caching the file. You would probably get better results by making 2 classes with the 2 images in them and then use addClass and removeClass
|
Add class to what? the image? How?
|
| All times are GMT +1. The time now is 08:43 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.