11/14 accordion does'nt work - Oops, try again. It looks like you haven't added two additional <div>s for your two new menu sections


#1

Hey guys,

I don't understand why my code doesn't work. Can anybody help me?

Here is the instruction:
We got you started in the index.html tab, but a menu's no good with only one section! Add two more like the first one. They should go inside the '#menu' div but after the "Section 1" div.

And that's my code:
$(document).ready(function) {
$('#menu').accordion(function(){
});
});


#2

Please show us your HTML. Thanks.


#3

This is the HTML Code:

    <script type='text/javascript' src='script.js'></script>
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
</head>
<body>
    <div id="menu">
        <h3>Section 1</h3>
        <div>
            <p>I'm the first section!</p>
        </div>
        <!--Add two more sections below!-->
        
    </div>

Maybe this is better:

$(document).ready(function) {
$('#menu').accordion(function(){
$('#menu').accordion(function(){
});
});
});

But it doesn't work as well...


#4

Copy that section and paste it twice (or for practice and muscle memory training, type it).


#5

Where do I have to copy it in? In HTML? Tried that but didn't work :disappointed:


#6

Just type the two divisions below this line, but above the closing tag.


#7

Why didn't I see that?! :unamused: Thank you, now it worked!!


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.