Getting CSS class names with js
To get CSS class names from DOM element simply use:
$(‘#dom-id’).attr(‘class’);
So it's simple as it looks ;)
Written by OfcaPL
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#