I've been trying around a lot to get this working, however every method I tried just didn't want to do as I wanted it to. So here I am.
I have a login-Mask that's only visible if the user is not logged in but it's permanently visible and covers some important areas. So here's my idea: hide it via toggle.
I know it's gonna take HTML, CSS and Javascript, so let's do this.
Here's a visual representation of where I'm at:
Now I want the Login-Widget to only show AFTER you click the "Login" text up top.
- Div is hidden by default - CSS: display:none;
- Text is
<a>
-Element withhref="#"
So if you click the Text "Login", the Login-Mask appears and if you click it again, it disappears. Just normal toggle.
I guess the best idea is to use div.toggleClass("open")
or something similar.
Any help is appreciated!
edit01: Here's my idea: functions.php
<script>
$( "a.toggle").click(function() {
$("div.log_forms").toggleClass( "open" );
});
</script>
edit02: