|
@ -24,12 +24,22 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
change: function(color) { |
|
|
change: function(color) { |
|
|
|
|
|
var oldcolor = this.$target.css("background-color"), |
|
|
|
|
|
sides = ["top", "bottom", "left", "right"]; |
|
|
this.$target.css("background-color", color); |
|
|
this.$target.css("background-color", color); |
|
|
|
|
|
|
|
|
// Old-school bgcolor attribute if the element already had one
|
|
|
// Old-school bgcolor attribute if the element already had one
|
|
|
if (this.$target.attr("bgcolor")) { |
|
|
if (this.$target.attr("bgcolor")) { |
|
|
this.$target.attr("bgcolor", color); |
|
|
this.$target.attr("bgcolor", color); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Match border colors if it was the same
|
|
|
|
|
|
for (var n in sides) { |
|
|
|
|
|
var property = "border-" + sides[n] + "-color"; |
|
|
|
|
|
if (this.$target.css(property) == oldcolor) { |
|
|
|
|
|
this.$target.css(property, color); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
})(jQuery); |
|
|
})(jQuery); |