how to get the class name of divs?
<body>
    <a id="append">Add DIV</a> 
    <div id="parent"></div>
    <script>
        $(document).ready(function() {
          var count = 0;
          $('#append').click(function() {
            $('#parent').append('<div
                class="article' + count + '">im div</div>');
            count++;
          });
          $('div').click(function() {
            alert(this.class);
          });
        });
    </script>
</body>
when i am trying to display class name of divs in alert it shows undefind.
 
     
     
     
     
     
     
     
     
    