:: Forum >>

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)
Wednesday, February 8, 2006
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)
Thursday, February 9, 2006
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', 'tabs-disabled');

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

Jim Hunter (www.FriendsOfAW.com)
Thursday, February 9, 2006

This topic is archived.

Back to support forum

Forum search