SetStyle on Click
SetStyle lets you set CSS style attributes for an element or elements. In this example, clicking on the avatar sets the left & right borders to a solid red 2 pixel wide line.
You can click here to restart the example.
$proto('#avatar', {
Click: {
onClick: {
SetStyle: {
borderLeftWidth: '2px',
borderLeftStyle: 'solid',
borderLeftColor: '#FF0000',
borderRightWidth: '2px',
borderRightStyle: 'solid',
borderRightColor: '#FF0000'
}
}
}
});