Thank you for colorize!
I'm using it in my project with small modification. When highlight background is to dark and text colour dark also - it's not visible. So it's my code modification with new option "altTextColor":
jQuery.fn.colorize = function(params) { options = { altColor: '#ECF6FC', bgColor: '#fff', hoverColor: '#BCD4EC', hiliteColor: 'yellow', oneClick: false, columns: false, altTextColor: 'white', banColumns: [] }; jQuery.extend(options, params);
var colorHandler = { checkHover: function() { if (!this.onfire) { this.origColor = this.style.backgroundColor; this.style.backgroundColor= options.hoverColor; this.origTextColor = this.style.color; this.style.color= options.altTextColor; } }, checkHoverOut: function() { if (!this.onfire) { this.style.backgroundColor=this.origColor; this.style.color= this.origTextColor; } },
More information about formatting options
new feature
Thank you for colorize!
I'm using it in my project with small modification. When highlight background is to dark and text colour dark also - it's not visible. So it's my code modification with new option "altTextColor":
jQuery.fn.colorize = function(params) {
options = {
altColor: '#ECF6FC',
bgColor: '#fff',
hoverColor: '#BCD4EC',
hiliteColor: 'yellow',
oneClick: false,
columns: false,
altTextColor: 'white',
banColumns: []
};
jQuery.extend(options, params);
var colorHandler = {
checkHover: function() {
if (!this.onfire) {
this.origColor = this.style.backgroundColor;
this.style.backgroundColor= options.hoverColor;
this.origTextColor = this.style.color;
this.style.color= options.altTextColor;
}
},
checkHoverOut: function() {
if (!this.onfire) {
this.style.backgroundColor=this.origColor;
this.style.color= this.origTextColor;
}
},