shurns — 2013-07-20T02:50:47-04:00 — #1
ralphm — 2013-07-20T04:17:32-04:00 — #2
You might as well use CSS sprites for that, as they are very reliable and quick to load. I can't see any advantage to using JS, but can see disadvantages. A user may have JS turned off, and some devices may not have great JS support.
shurns — 2013-07-20T04:41:52-04:00 — #3
Thanks for the reply, Ralph.
I googled about this subject. Other developers mentioned about using CSS sprites for rollovers also. There was a time when users implemented rollovers, they would use inline event handlers (messy), in cases people with limited knowledge in web development used this. I've seen other cases when developers created scripts for rollovers, or even more complex ones, which was why I was wondering what is better to use.
I was considering creating a simple library for this feature.
I will use CSS sprites.