Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2010
    Posts
    68
    Thanks
    29
    Thanked 0 Times in 0 Posts

    bootstrap menu drop down not working because of jquery

    I'm using a bootstrap menu which has a menu with drop downs on hover. because there are so many pages on the site I create a menu.html file so changes can be made in one place and then it gets inserted with the following jquery script:


    Code:
    <script>
        $(function(){
            $("#insert_header").load("header.html", function(){
                $('ul.nav a[href$="index.html"]').parent().addClass("active");
            });
        });
    </script>
    and gets inserted to
    html
    Code:
    <div id="insert_header"></div>

    here is the site:
    Hooper Dentistry - Upper Arlington
    Any ideas on how to fix this?

  • #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,981
    Thanks
    56
    Thanked 557 Times in 554 Posts
    Being that your page looks OK (to me, anyway - I have no idea what your real problem may be) in Chrome and Firefox, I suspect you are having troubles in IE.

    If you are having troubles in old IE, as in <9, it may be because you are using v2 of jQuery which has dropped support for IE 8 and below. In that case you might explore using an older version of jQuery

    If your problem is something else, please be more specific - this is what happens/this is what I want to happen is a good template to stick to

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,729
    Thanks
    6
    Thanked 1,017 Times in 990 Posts
    Also, please post jQuery and Bootcrap questions in the JS frameworks forum, because that’s what they are.

  • #4
    New Coder
    Join Date
    Oct 2010
    Posts
    68
    Thanks
    29
    Thanked 0 Times in 0 Posts
    Sorry, I guess I left out that the drop down menu is not working how it is supposed to work. The drop down should open on hover, but when I use the script to insert the menu it is not working unless you click on the menu. I have a feeling that it is the order of the scripts that is causing the problem, but I still can't get it to work.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •