I think you want to use hasClass()
$('li.menu').hasClass('active');
You can retrieve all elements having the 'active' class using the following:
$('.active')
Checking wether or not there are any would, i belief, be with
if($('.active').length > 0){ // code}
You can use the hasClass method, eg.
hasClass
$('li.menu').hasClass('active') // true|false
Or if you want to select it in one go, you can use:
$('li.menu.active')