title: Add a custom attribute to an element in Jquery
body: <p>I'm trying to add a custom attribute on my element using jquery : </p>
  
  <pre><code>$('.map-areas-div').rand(numElements).each(function(){
        $(this).attr('element_id',4);
  });
  </code></pre>
  
  <p>But in the end, my elements doesn't have a "element_id" attribute.</p>
  
  <p>PS, my html elements look like :</p>
  
  <pre><code>&lt;div type="ground" class="map-areas-div" style="position: absolute; top: 900px; left: 720px; height: 40px; width: 90px;"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Thank you for help</p>