Question: This is what's happening in my boostrap menu. When I click any item in the dropdown the child is selected (`class="active"`) but the parent is not. So, if the dropdown is closed you can't see in the menu the selected page.

```
<ul class="nav navbar-nav navbar-right">
  <li class="my-class"><a href="#">Home</a></li>
     <ul role="menu" class=" dropdown-menu">
      <li class="active"><a href="#">Brokerage</a></li>
      <li class="my-other-class"><a href="#">Consulting</a></li>
    </ul>
  </li>
  <li class="my-class"><a href="#">Contact Us</a></li>
</ul>

```

I'm trying to do it with this but it's not working:

```
$('li').click(function() {
 $(this).parents().addClass('.active');  
});

```

Any help? Thanks.

Answer: 
It looks like you are using Tkinter within your Python app. The Cocoa-based Aqua Tk on OS X creates the base menu options and includes a default `About` menu item. It is not documented very well in Tk, but it is possible to override the default Cocoa `About` by overriding the default Tk `tkAboutDialog` command. Here's a very simple example which uses the built-in Aqua Tk `standardAboutPanel`.

```
try:
    from tkinter import *   # Python 3
except ImportError:
    from Tkinter import *   # Python 2

def new_file():
    # ...
    pass

def about_dialog():
    root.tk.call('tk::mac::standardAboutPanel')

root = Tk()
win = Toplevel(root)
menubar = Menu(win)
menu_file = Menu(menubar)
# ...
menubar.add_cascade(menu=menu_file, label='File')
# ...
menu_file.add_command(label='New', command=new_file)
# ...
root.createcommand('tkAboutDialog', about_dialog)
win['menu'] = menubar
root.mainloop()

```

There's more info [here](http://comments.gmane.org/gmane.comp.python.tkinter/3149).
Thanks a lot for this great answer. I've seen that you added some additional menu bar entries to your code, not only the "About" panel. If all you want is to provide a custom "About" panel, here is the stripped down Python 3 version.

```
from tkinter import *

def about_dialog():
    root.tk.call('tk::mac::standardAboutPanel')

root = Tk()
root.createcommand('tkAboutDialog', about_dialog)
root.mainloop()

```