check if class is active jquery

JavaScript
$('li.menu').hasClass('active');
Source

Also in JavaScript: