Core Docs | Additional Modules Docs

sb.widgets.colorPalette


@Description: Used to create a websafe color palette table
@File: widget/colorPalette.js
@Author: Paul Visco v1.01 11/05/07 12/15/08
@Example:
sb.include('widget.colorPalette');

var table = new sb.widget.colorPalette({
    id : 'jimmy',
    events : {
        click : function(e){
            if(td.nodeName =='TD'){
                    if(table.selectedColor){
                        table.selectedColor.style.border='';
                    }
                $('body').style.backgroundColor=td.style.backgroundColor;
                td.style.border='1px solid white';
                table.selectedColor = td;
            }
        }
    }
});

table.appendToTop('body');