Reader small image

You're reading from  jQuery for Designers Beginner's Guide Second Edition

Product typeBook
Published inJul 2014
Reading LevelBeginner
Publisher
ISBN-139781783284535
Edition1st Edition
Languages
Tools
Concepts
Right arrow
Author (1)
Natalie Maclees
Natalie Maclees
author image
Natalie Maclees

contacted on 10 may '16 _______________ Natalie MacLees is the founder of Purple Pen Productions (purplepen.com), an interactive agency based in Los Angeles, California. She has been designing websites since 1997 and is a passionate advocate of both accessibility and usability. She loves teaching and sharing her knowledge, both in seminars and workshops and also with her clients. She discovered WordPress a few years ago as a flexible, extendable, and quick way to build robust websites that clients could manage on their own. She is the organizer of the Southern California WordPress Meetup Group. She is also a Google Analytics Qualified Individual.
Read more about Natalie Maclees

Right arrow

Time for action – creating a vertical fly-out menu


Switching from a horizontal drop-down menu to a vertical fly-out menu couldn't be easier. We'll use the same HTML markup and our JavaScript code will stay the same. The only difference we'll need to make is to add some new CSS to make our menu display vertically instead of horizontally. We can keep working with the same files we used in the last example. Perform the following steps to create a fly-out menu:

  1. In the css folder of the Superfish download, you'll find a file named superfish-vertical.css. Copy that file to your own styles folder. In the head section of the HTML file, we'll attach the new CSS file, after superfish.css, as shown in the following code:

    <link rel="stylesheet" href="styles/superfish.css"/>
    <link rel="stylesheet" href="styles/superfish-vertical.css"/>
    
  2. Now, inside your index.html file, find the <ul> element that holds the entire menu and add a class of sf-vertical:

    <nav>
      <ul id="sfNav" class...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
jQuery for Designers Beginner's Guide Second Edition
Published in: Jul 2014Publisher: ISBN-13: 9781783284535

Author (1)

author image
Natalie Maclees

contacted on 10 may '16 _______________ Natalie MacLees is the founder of Purple Pen Productions (purplepen.com), an interactive agency based in Los Angeles, California. She has been designing websites since 1997 and is a passionate advocate of both accessibility and usability. She loves teaching and sharing her knowledge, both in seminars and workshops and also with her clients. She discovered WordPress a few years ago as a flexible, extendable, and quick way to build robust websites that clients could manage on their own. She is the organizer of the Southern California WordPress Meetup Group. She is also a Google Analytics Qualified Individual.
Read more about Natalie Maclees