title: Javascript Jquery How the get the name of $(this) Object
body: <p>I'm interested by retrieving the name / object key (I dont know how to call that) of a <code>$(this)</code> object.</p>
  
  <p>By example, when you do a <code>console.log</code> of <code>$(this)</code> in a click event, firebug print : </p>
  
  <blockquote>
    <p>Object[h1#Title.uppercase.ui-draggable]</p>
  </blockquote>
  
  <p>I'm interested by getting this : </p>
  
  <blockquote>
    <p>h1#Title.uppercase.ui-draggable</p>
  </blockquote>
  
  <p>How can I do it ? </p>
  
  <hr>
  
  <p>EDIT : </p>
  
  <p>I find a way to recompose what I want with a little script, here it is : </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var tag = $(this).prop('tagName').toLowerCase();
  var id = $(this).prop('id');
  
  if(id.length&gt;0){
    var id = '#'+id;
  }else{
    var id = '';
  }
  
  var classes = $(this).prop('class');
  
  if(classes.length&gt;0){
  
    var class_list = classes.split(' ');
    var class_chain = '';   
    for(i=0;i&lt;class_list.length;i++){
      class_chain = class_chain+'.'+class_list[i];
    }
  
  }else{
    var class_chain = '';
  }
  
  var complete_chain = tag+id+class_chain;</code></pre>
  </div>
  </div>
  </p>