I wrote a simple function:
function addColoredBorder(color) {
$(".coloredBorder").css({
border-left: color,
padding-left: "15px",
border-radius: "10px"
});
};
Then in HTML i would call the function, but for some reason, it doesn't accept it. I know, you could do:
function f_border () {
return "border:"
}
function f_attribute(x) {
return x
}
function addColoredBorder() {
$(".coloredBorder").css(f_border(), f_attribute());
});
But i need it to be as compact and simple for it to be as possible. toggleClass is out of question.
So experts, how can i set color without writing massive amounts of code?
(PS. The second block of code might not be correct at all, but i believe it goes somewhat like that.)