4 Replies Latest reply on Aug 15, 2013 1:50 PM by David_Tardiveau

    The class name

    David_Tardiveau Level 1

      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