Posted by : Jebastin Wednesday, 19 February 2014

Consider the following HTML:
<div id="myId" class="myclass"></div>

jQuery:
var className = $('.myclass').attr('class');
(or)
var className = $('#myId').attr('class');

Reference: StackOverflow.com

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Link To This Post/Page

Spread The Word

Add this button to your blog:
JJ Technology Solutions

Blog Archive

Trackers

eXTReMe Tracker
facebook

- Copyright © JJ Technology Solutions - Powered by Source Code Solutions -