To have a gradient background on an element I do something like this:
.css('filter','progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#FFFFFF\', endColorstr=\'#'+event.backgroundColor+'\', gradientType=1)')
.css('background-image','-webkit-gradient(linear, left top, right bottom, color-stop(0.1, #FFFFFF), color-stop(0.99, #'+event.backgroundColor+'))')
.css('background-image','-moz-linear-gradient(top left, #FFFFFF 0%, #'+event.backgroundColor+' 100%)')
.css('background-image','-o-linear-gradient(top left, #FFFFFF 0%, #'+event.backgroundColor+' 100%)')
Now, isn't jQuery suppose to eliminate all the work related to cross-browser compatibility issues? is there any better way to do that. Without using any additional plugins?
background, then if you change any of the background properties later, for example background-position, then you can also overwrite the gradient you set in background. The CSS Specifications suggest not using shorthand codes anymore.