views:

146

answers:

2

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
    }
})
A: 

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.

greg
A: 

I think you can do something like

this.$().addClass()

to add any class you want.

hvgotcodes