0

I want to open a menu through an external button:

http://jsfiddle.net/kJKq6/10/

The button can't be arranged within the html code of the menu. Im new at html and Javascript/Jquery and don't know the solution, please can anyone help? Many Greetings

<button type="button">THIS BUTTON SHALL TRIGGER THE A LINK WHICH OPENS THE MENU</button>
user1941083
  • 51
  • 1
  • 1
  • 4

1 Answers1

0

To stick with your current syntax:

Insert a newline at line 16 of the javascript file and insert:

$('button').on('click', function () { $('.nav li').toggleClass("open"); });

This code will cause the button to toggle the list on and off on each click.

chapster87
  • 51
  • 3
  • Happy to help. Can you please mark my response as the answer? As you can see I need all the reputation I can get. Thanks. – chapster87 Dec 27 '13 at 13:36