Flask Tutoria Web Development with Python 4-5 - jquery and modal not working

by: stljim, 8 years ago


Hello,

I have been trying to find a tutorial 'place' to develop my understanding of Python (2.7) and Flask.  I would really like this one to be it and (support your work).  

I've been following along with the tutorials and I'm stuck and this __should_ work but it isn't.  I'm getting no errors (via Firefox debugger).  Can someone _please_ be a 2nd pair of eyes and let me know what I'm missing?

When I click on "Dropdown", nothing happens... not a darned thing.  I don't see anything in the debug console of the browser.  I don't feel I can move on, and understand, the tutorials until I can get past this.



<header>
......
lots of stuff
......
  <ul class="nav navbar-nav navbar-right">
                <li><a href="/">Link</a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="/">Action</a></li>
                            <li><a href="/">Another action</a></li>
                            <li><a href="/">Something else here</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">Separated link</a></li>
                        </ul>
                </ul>
</header>
    <body>
        <!-- just pointing to dl copy -->
        <script scr="static/js/jquery-1.12.4.min.js"></script>
        <!-- <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" cross origin="anonymous"></script> -->
        <script type="text/javascript" scr="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
    </body>





You must be logged in to post. Please login or register an account.



Press F12 to open developers console, refresh the page. If the dropdown isn't working it sounds like you're missing some javascript or something.

-Harrison 8 years ago

You must be logged in to post. Please login or register an account.

It really really really help when you specify a source, src, parameter in a script that you spell it src and NOT SCR!

 <script scr="static/js/jquery-1.12.4.min.js"></script> != <script src="static/js/jquery-1.12.4.min.js"></script>  


Why PyCharm doesnt' 'catch' that I don't know, it should.  Anyway, I'm an idiot!

-stljim 8 years ago

You must be logged in to post. Please login or register an account.