3.2.0

What is the syntax for getClass?

What is the calling convention for getClass and what is the expected return value?

I want to be able to query an object to know if a class has been applied to it or not. Is this the correct way to get that information?
Jim Hunter (www.FriendsOfAW.com)
February 8,
You can call

var value = obj.getClass(name);

This should return the value which you have previously set with setClass(). In case its a function - the function will be executed and the function result returned.
Alex (ActiveWidgets)
February 9,
But what are you expecting in 'name'? I tried the following with no luck:

assuming this class was assigned to the control

.aw-extension-tabs-disabled {color:gray; background-position: 100% 0px!important;}


I tried

obj.getClass('extension')
obj.getClass('aw.extension')
obj.getClass('extension', 'tabs-disabled');
obj.getClass('color')
obj.getClass('aw-extension-tabs-disabled')


everything I tried returned 'undefined'. So I guess I am not only looking for the syntax, but a real world example.

Thanks
Jim Hunter (www.FriendsOfAW.com)
February 9,

This topic is archived.

See also:


Back to support forum