Webunity | Gilles van den Hoven schrieb:
> Klaus Hartl wrote:
>> Works fine in Safari 2.04. One little thing though: Safari is the only 
>> browser I know that doesn't trigger a click or does not focus the 
>> associated form element when clicking on the label. That always annoys me.
>>   
> The code as is right now should trigger the click event on the element 
> it is "watching", e.g. you click the label, the label finds the "for" 
> and triggers the "click" event, and thus also the toggle state. I use 
> basic jQuery code for that, so that should work...

If I click on the label in Safari, nothing happens.


> p.s. I am no CSS guru, but the flickering of the images could be solved 
> by using 1 background image, and 8 states in that image (thus using 
> background-position) if i am right...

Not necessarily. At least on links IE likes to request background images 
on every hover.

But I would do that 8 in 1 state image anyway because it saves you a 
roundtrip to the server and you just have to change the background 
position on hover, which I find more elegant. And because it is no link, 
maybe it fixes that flicker here as well.

To prevent a bug in earlier Safari versions (background repeats although 
background-repeat is set to no-repeat) the image should have a blank 
part at the bottom:

__ image top border

state 1




state 2



...



state 8




__ image bottom border


Background flicker is ideally fixed with a server setting (Dean Edwards 
wrote about that), otherwise there was another snippet discovered 
recently that works in IE6SP2+


-- Klaus


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to