Attempting to write some Javascript for a Wordpress install.
I have this in my header:
<div id="loginWarningRed">
You Must
<a href="#/?edit-account">Log In</a>
To See Pricing
</div>
and then
.logged-in #loginWarningRed {display:none;}
and it's working fine, but I would like to write some Javascript to welcome the user when logged in.
Something like:
if (jQuery('body').hasClass('logged-in')) {
document.getElementById(loginWarningRed);innerHTML = "Welcome %USER%";
}
However, when I put this snippet in my custom js text-area, nothing happens. I have no error message in the console.
Also, for the record, I have changed css to /*.logged-in {display:none;}*/
.