This is almost embarrassing...almost because I'm just not seeing what I usually do.
I'm trying to execute a function in jquery in a Drupal site.
The function is:
if ($('body').hasClass('.logged-in')) {
$('ul.dropmenu').append('<li class="loggedInOverride">' + '<a href="/logout">' + 'Log out' + '</a>' + '</li>');
};
I have a new menu for a certain section of a website that is getting an entirely new theme and the current Primary navigation was built with older javascript and was a hornets nest to just restyle so I created a new menu, stuck it in a block and all is well except for the login/out behavior.
Since it's custom html/css/jquery and NOT a 'menu' within Drupal, the auto functionality of showing appropriate logout links isn't applicable here. Drupal 6.28 btw.
The statement works fine in firebugs console but I've tried this in a separate js file (other functions working so the file does load and there are no errors...other than not working!), I've tried sticking it at the bottom in my page.tpl.php file but the body is returned undefined even though the php is all processed first.
Where am I missing something here?