been playing with this for a few hours and can’t figure it out.
Basically I want this to show on hover, and click it to toggle whether it is displayed or not. I thought this was the way to do it with display:block;, but I can’t get it to work.
Thanks for any help.
Currently you’re using
$(this)in the.click(), but that’s the<button>(#related-btn) not the<div>(#show-hide), I think what you want is this:You can see an updated example here
Or if you wanted it animated in both cases, this is a bit shorter:
Or…if you want not to toggle it, but have a click “pin” it, you can do that like this:
You can see a demo of that here