I have an li
tag that looks like:
<li class="active_fix generator" data-selected="1"></li>
Within my onClick
event I have a console.log
on $(this)
and I get back
[li.active_fix generator]
- among a few things in my console window.
How can I grab the class. So for example save the classname active_fix
as a var
but not the second class name generator
.
$('active_fix').on('click', function() {
console.log($(this));
})
Thanks.