jscolor widget position:fixed

This is a quick note for anyone who ends up googling this problem (and also for Future Me who will probably forget how I solved it):

If you want your jscolor widget to have the CSS property position:fixed (i.e. you want the color widget to always stay in the same place even if the user scrolls down the webpage): go into your jscolor.js and replace this line:

p.boxB.style.position = 'absolute';

with this:

p.boxB.style.position = 'fixed';

That’s it. Easy peasy.

Advertisements