thedigicraft / Atom.CMS

Atom.CMS
56 stars 52 forks source link

Video 30 Dropdown Menu #97

Closed mconnors31 closed 9 years ago

mconnors31 commented 9 years ago

Hi, I have been following the series and have now gotten stuck on getting the dropdown menu to dropdown. It appears but does not dropdown. My code is the same as the tutorials and I am having difficulty getting it to work. Is there anything different that needed to be done that wasn't in the video? I am stumped.

Below is my navigation.php code:

            <nav class="navbar navbar-default" role="navigation" >

                        <ul class="nav navbar-nav">

                            <?php //nav_main($dbc, $pageid); ?>

                            <li><a href="#">Dashboard</a></li>
                            <li><a href="#">Pages</a></li>
                            <li><a href="#">Users</a></li>
                            <li><a href="#">Settings</a></li>

                        </ul>   

                        <div class="pull-right">
                            <ul class="nav navbar-nav">

                                <li>
                                    <?php if($debug == 1) { ?>
                                        <button type = "button" id="btn-debug" class="btn btn-default navbar-btn"><i class="fa fa-bug"></i></button>
                                    <?php } ?>
                                </li>

                                 <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Dropdown <b class="caret"></b></a>
                                    <ul class="dropdown-menu" role="menu">
                                        <li><a href="logout.php">Logout</a></li>
                                        <li><a href="#">Action</a></li>
                                    </ul>
                                </li>

                            </ul>

                        </div>
            </nav><!-- End Nav -->
creptor commented 9 years ago

the videos where made with bootstrap, to search for problems css based please go to the bootstrap page, there's toons of info on how to create things with it. Here is a link refering to your problem http://getbootstrap.com/components/#navbar-default

mconnors31 commented 9 years ago

thanks. I had already been there and was comparing my code with what was written and could not find what was wrong. I have done some google searches and I am finding a lot if issues, but no real solutions.

creptor commented 9 years ago

yea, there's no way you get another person with the same error with css. Just don't try to google it anymore it's uselless, now..... You may have some issues getting the css bootstrap file or the js bootstrap file, please ensure you have those two called in your website before continuing this post. (yea most css bootstrap content requires it's javascript)

thedigicraft commented 9 years ago

@mconnors31 I agree with @creptor. Odds are that it is the Javascript. Make sure that the javascript and jquery scripts are being called correctly.

mconnors31 commented 9 years ago

You both were right. It was with the JavaScript. Thanks for your replies