cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Set class of 2d Container using javascript

izdane
4-Participant

Set class of 2d Container using javascript

Is there any way to set the class of a 2d container using javascript? Whenever I try to set the class using the following line of code:

$scope.app.view.Home.wdg["panel-2"]).class = "my-class";

I get an object undefined error.

 

1 ACCEPTED SOLUTION

Accepted Solutions
jmikesell
15-Moonstone
(To:izdane)

Not sure if this will work but try the "other" method of setting widget properties.

 

$scope.setWidgetProp(StudioID, Property, Value)

so for your example

$scope.setWidgetProp('panel-2', 'class', 'my-class')

View solution in original post

2 REPLIES 2
jmikesell
15-Moonstone
(To:izdane)

Not sure if this will work but try the "other" method of setting widget properties.

 

$scope.setWidgetProp(StudioID, Property, Value)

so for your example

$scope.setWidgetProp('panel-2', 'class', 'my-class')
izdane
4-Participant
(To:jmikesell)

Yep that worked thank you!

Top Tags