Drop Down not working in mobile- Bootstrap

Melody Scott
Melody Scott used Ask the Experts™
on
www dot mostlydesserts.com  - on this site, if you click on Products in mobile, the drop down doesn't appear. I'm not sure what I've done wrong, I've checked it against the bootstrap information.

It probably is another part of the navigation blocking it, but I haven't been able to figure that out yet, can you help?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
James RodgersWeb Applications Developer

Commented:
you have at least one js not loading,
GET http://www.mostlydesserts.com/owl-carousel/owl.carousel.js 404 (Not Found)

which causes a js error, js errors can cause all subsequent js to not work

Author

Commented:
Thanks for that! That was something I missed. However, I uploaded it, and the drop down still is not working in mobile.
James RodgersWeb Applications Developer

Commented:
sanity check, change "Products" from a href to jut plain text

i.e.: change

<a class="dropdown-toggle" data-toggle="dropdown" href="#">Products
        <span class="caret"></span></a>
to just

Products
        <span class="caret"></span>

do you still have the same issue?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Yes, it looks like I still have the same issue. www.mostlydesserts.com/about.html - My own sanity check.. I am seeing this in mobile testers like Chrome developer and http://mobiletest.me. I don't actually have a smart phone with me... are you able to check it on an actual phone?
James RodgersWeb Applications Developer

Commented:
tried it on an android, closes the menu as soon as i hit products, does not expand
James RodgersWeb Applications Developer

Commented:
i still see the link as an href, make it just plain text

Author

Commented:
I'm sorry, you're right, I thought I'd done it, but I uploaded it to the wrong directory. It should be good now, I'll check to see if it helped.

Author

Commented:
Ok, did that, and it looked like this, so I changed it back.

Capture.JPG
James RodgersWeb Applications Developer

Commented:
its not the look, i needed to test the functionality, there is code affecting ul li a instances, I wanted to check if that is what is causing the issue, some cSs can make the text look right while testing

Author

Commented:
oh, ok. I put it on a test page - go to /test.html on that site. Thanks.
Web Applications Developer
Commented:
yes, it looks like the code for opening closing the menu doesn't understand sub menu items, it reads that the anchor was clicked, but doesn't know to expand the sub menu on mobile

pretty sure it is this block of code
// Closes the Responsive Menu on Menu Item Click
$('.navbar-collapse ul li a').click(function() {
    $('.navbar-toggle:visible').click();
});

Open in new window


that is causng the issue

Author

Commented:
Ok, Thanks, I'll work with that and see what I can do. Appreciate it! I'll leave this open, I may have another question....

Author

Commented:
That was it, thanks so much! If I comment that out, the problem goes away. It doesn't seem to cause any new problems that I can find.
James RodgersWeb Applications Developer

Commented:
yea, looks kind of strange, should all be handled by css

FYI, the submenu text is a little hard to see on my screen, a little dark compared to the background

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial