4

I am using this div in my layout. I am new to jQuery. So I want to know class name of div.

<div class="demo"></div>

Any help is much appreciated. Thanks.

Saloni Parekh
  • 55
  • 1
  • 1
  • 5

1 Answers1

7

Use this code

 var className = $('.demo').attr('class');

You can refer here,

http://www.w3schools.com/jquery/html_attr.asp

Aamir
  • 2,173
  • 1
  • 29
  • 58