How to hide menu on all pages, but appear on hover?

rhiannon / 2014-03-09 16:24:16   

Hi everyone,

I've been through the forum looking for an answer to this but I haven't found anything. What I am trying to achieve is to have a single word like "menu" or even a logo in the top left corner of every page (like the pre nav image), and when you hover on it, the menu appears.

Basically, I feel that seeing the menu is a bit distracting when looking at images, and I'd like to have it hidden.

I have no idea where to start with this but I have a feeling it may be a javascript thing?

Thank you in advance,

Rhiannon
(save-polaroid.com)

arsondpi / 2014-03-09 17:51:41   

This takes me back to my very first Indexhibit site in which I had this functionality.
To do what you're after you would have to use quite complex code - you'll need to search the internet for something specific and custom.

However you can incorporate a simpler technique using a button in your pre-nav area.
Try this - insert the following javascript inside the head tag of your index.php template (ndxzsite>default>index.php)

  1. <script type='text/javascript'>
  2. $(document).ready(function()
  3. {
  4.     $('#button').click(function() {
  5.         $('#index ul').toggle();
  6.     });
  7. });
  8. </script>

And then add a button that will do the switching bit

  1. <div id='button' style='cursor:pointer;'>index</div>

You can paste the index button in your pre-nav area or even your text area of your exhibits. Essentially the button shows/hides all ul selectors inside #index.

rhiannon / 2014-03-09 19:10:57   

Thank you arsondpi! That's a great help. You're a star.

I have that working for now using the method you suggested which will work for the time being till I can figure out how to have it extend on hover for a set duration, etc, but as you say, that'll probably be quite complicated!

The only thing that is odd is that I seem to have lost any padding on my index to the left? I tried adding padding in the index container but to no avail and I've looked and can't spot the fault. Did I do something wrong?

Rhiannon

rhiannon / 2014-03-09 21:09:47   
Ignore me, I worked it out. It was a dumb extra . Sorry!

This thread has been closed, thank you.