In sproutcore I'm trying to change the border thickness of a div when a user mouses over it. All the other code is working but I can't find how to either access the css properties directly or attach a new classname to the div.
borderDiv: SC.View.design({
layout:{top:60, left:60, width: 400, height: 525},
classNames:"panel",
mouseEntered: function(evt) {
alert("this is working");
//
// No idea what to put here to change css properties
//
return YES
}
})
I think you can do something like
this.$().addClass()
to add any class you want.
Not exactly what I was looking for but what mostly gets the job done is using css pseudo-classes. :hover, :active, and :focus cover most bases for my use.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.