Can I make a javascript function so that the property and value would work in stylesheet?
So the following would work:
.selector{
myproperty: myvalue1; /* myvalue1, myvalue2, myvalue3 */
}
Suppose, I would define the myvalue1, myvalue2, and myvalue3 in js for eg. sets element's background-color to red, green and blue respectively and now defining it in stylesheet it should be able to set div's background color to red,green, and blue at their respective.
if('myproperty' in document.body.style){
//don't do anything
}else{
//do stuff here
//something like this
document.body.style.myproperty = [value1,value2,vlaue3]
}