[jQuery] New plug-in: Farbtastic (color picker)
Announcing Farbtastic. It's an elegant color picker that uses only
transparent PNGs, CSS and JavaScript and presents a full HSL (not
HSB) color space.
I wrote this a while ago, but the code was rather ugly and it didn't
work in all situations. So I updated it to work with jQuery and fixed
(hopefully) all the bugs. I've tried to make it as jQuery-ish as
possible.
Demo, source and docs at:
http://www.acko.net/dev/farbtastic
I did have severe problems getting the mouse handling to work right.
I haven't found out a clean way of getting mouse coordinates relative
to a particular element. Right now I use event.pageY and emulate it
on IE by subtracting the html scrolling distance from event.clientY.
But it still had some problems in more exotic CSS layouts in IE (e.g.
negative margins or overflow: auto).
Most scripts only need coordinates relative to an arbitrary, given
point (e.g. draggables), but here I needed more. Does anyone
perchance have a good reference on cross-browser mouse even handling
that has reliable click coordinate information?
Steven Wittens
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/