reset bootstrap dropdown form menu after clicking a link

I have a dropdown form menu for my login functionality, within that form menu, I have a reset password link, that when clicked, opens up a pop up modal window for the user to enter in their email and reset their password. Everything works great, except I want to close down the dropdown menu when the modal popup appears. Below is my markup for the dropdown:

                    <li class="dropdown">
                        <a class="dropdown-toggle navbar-brand" href="#" data-toggle="dropdown" id="navLogin"><strong class="caret"></strong></a>
                        <div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">
                            <form method="post" action="login" accept-charset="UTF-8">
                                <input style="margin-bottom: 15px;" type="text" placeholder="Email" id="txtLoginEmail" name="txtLoginEmail" />
                                <input style="margin-bottom: 15px;" type="password" placeholder="Password" id="txtLoginPassword" name="txtLoginPassword" />
                                <input style="float: left; margin-right: 10px;" type="checkbox" name="chkRememberMe" id="chkRememberMe" checked="checked" />
                                <label class="string optional" for="chkRememberMe"> Remember me</label>
                                <input class="btn btn-primary btn-block" type="button" id="btnLogin" value="Sign In" onclick="javascript:login();">
                                <br />
                                <div class="centerMe"><a href="javascript:forgotPassword()" style="font-weight: bolder;"><em>forgot password?</em></a></div>
                            </form>
                        </div>
                    </li>

Open in new window


any help is greatly appreciated, I'm using Bootstrap and Jquery
LVL 34
Big MontyWeb Ninja at largeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
Maybe something like this

$('#myModal').on('shown.bs.modal', function() {
   $('.dropdown.open').removeClass('open');
});

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big MontyWeb Ninja at largeAuthor Commented:
worked perfect, thanks
Julian HansenCommented:
You are welcome.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.