W
W
weranda2015-03-24 11:47:39
JavaScript
weranda, 2015-03-24 11:47:39

How to set up slideout.js?

Greetings.
There is a menu script - slideout.js with instructions . Everything seems to be elementary, but it does not work out in any way. I do everything according to the instructions.
jsfiddle.net/weranda/ma4pvg5p
Any ideas?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2015-03-24
@weranda

If you want to click on the button, then you forgot something:

document.querySelector('button').addEventListener('click', function() {
        slideout.toggle();
});

And slideout.js must be included before script initialization.
Set jsfiddle Frameworks & Extensions to nowrap in
jsfiddle.net/Lshamfyw

W
weranda, 2015-03-24
@weranda

And now, embedded js in html jsfiddle.net/weranda/09cg3mnz
Still doesn't work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question