Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

The class name

$
0
0

Hello everybody,

 

When i try to get the name of the class of an element, i get :

 

Stage_place2_id carte3 (This is the name of the element (place2) + the string "_id" + the name of the class i'm trying to get)

 

I'm obliged to write this to only get the right name (to get "carte3") :

 

var nom = sym.$(e.target).attr('class')

var debut = nom.length-6

var nomClass = nom.substr(debut,6)

 

 

No so complicated, but quite long, is there a better solution ?

 

David


Viewing all articles
Browse latest Browse all 9897

Trending Articles