For a long time I found solutions on the web that required too much code (JavaScript & Css).
While reviewing those solutions, few things stood out: • Necessity of a background image – since it is a styled checkbox and has to have the flexibility of changing its border, background and the “v” color. • Problem hiding the checkbox (via Css) and replacing it with span or div. It required moving any script attached, from checkbox to its replacement.
Solution: div with background image wraps a transparent checkbox.
It was tested on Windows XP in browsers: - IE7 & 8 - Firefox 3.5.9 - Safari 4.0.5(531.22.7) - Google Chrome 4.1
I’ll be thankful if someone could run this solution on Opera & other OS, so that the title of this post will be a correct one.
I am a biginner with jQuery. I find this site with google. I try to use your code for a css list menu. In my menu I use the css :hover for a "little" animation. An this is it what I try to fade with jquery - the :hover effect. I have three imgs, one vor "normal", one for ":hover" and one for "act". Alle bg-imgs have the same dimension, but the content of the bg-imgs are different. For "normal" it is only the text (pixel), for ":hover" it is the same text like "normal" and a star under the text. This works with some edits of your code värdering hus .