up.Preview.prototype.setStyle([element], styles)
Instance method
Temporarily sets inline CSS styles on an element.
Example
This preview temporarily changes the background and foreground colors of the targeted fragment:
up.preview('highlight', function(preview) {
preview.setStyle({
'color': 'yellow',
'background-color': 'red'
})
})
Parameters
[element=this.fragment]
optional
The element or selector to change.
If omitted, the targeted fragment will be changed.
Type: Element | string
styles