@File: /surebert/widget/colorRandomizer.js
@Author: Paul Visco 07-06-2008
@Description: Used to create a palette of random color swatches.
var y = new sb.widget.colorRandomizer({
numSwatches : 10,
mouseDown : function(e, self){
//do something when the swatch is clicked
if(e.shiftKey){
self.palette.remove();
return;
}
var target = sb.events.target(e);
document.body.style.backgroundColor = target.style.backgroundColor;
}
});
y.palette.appendTo('#themes');
@File: /surebert/widget/colorRandomizer.js
@Description: Used to hold the reference to window.setInterval instance create by this.cycle();
window.clearInterval(yourInstance.cycler);
@File: /surebert/widget/colorRandomizer.js
@Description: The amount of milliseconds between cycling the colors
@File: /surebert/widget/colorRandomizer.js
@Description: The sb.element node used to hold the palette. This is what you would append to to the DOM
yourInstance.palette.appendTo('#themes');
@File: /surebert/widget/colorRandomizer.js
@Description: Starts the cycling through the colors