Having trouble with jQuery and css. Looking to display div with id login-alert when an option is selected from a dropdown list. Attempted code below, but no success. Need some assistance in figuring out what's missing.
<script>
$('.menu option').each(function() {
<?php if (!is_user_logged_in()): ?>
$('#login-alert').css('display', 'block !important');
<?php endif; ?>
};
</script>