JQuery drill down popup like google settings in gmail


I am looking for any plugin in JQuery to show drill down popup like settings in Gmail.

Attached image for reference.

Any advise.


Attached image


You shouldn’t need a plugin for this - it’s just a matter of styling a div correctly using CSS, then using JS to show/hide it.

CSS isn’t my strongest suit, but here’s what I came up with having examined the code on the Google site.
I’m sure it could be tidied up somewhat.

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <title>Settings button</title>  
      .settings {
        -webkit-border-radius: 2px;
        border-radius: 2px;
        cursor: default;
        font-size: 11px;
        font-weight: bold;
        text-align: center;
        white-space: nowrap;
        margin-right: 16px;
        height: 27px;
        line-height: 27px;
        min-width: 54px;
        outline: 0;
        padding: 0 8px;
        -webkit-box-shadow: none;
        box-shadow: none;
        background-color: #f5f5f5;
        background-image: -webkit-linear-gradient(top,#f5f5f5,#f1f1f1);
        background-image: linear-gradient(top,#f5f5f5,#f1f1f1);
        color: #444;
        border: 1px solid #dcdcdc;
        border: 1px solid rgba(0,0,0,0.1);
        position: relative;
        display: inline-block;

      .cog {
        background: no-repeat url(sprites.png) 0 -472px;
        height: 21px;
        width: 21px;
        position: relative;
        display: inline-block;
        opacity: .55;
        margin-top: -3px;
        vertical-align: middle;

      .down-arrow {
        height: 6px;
        width: 7px;
        background: url(arrow_down.png) no-repeat 0 1px;
        vertical-align: middle;
        font-size: 0;
        margin-left: 3px;
        position: relative;
        display: inline-block;
        opacity: .55;
        margin-top: -3px;
        vertical-align: middle;

        margin-top: 0px;
        list-style: none;
        text-align: left;
        padding: 0;
        display: none;
        -webkit-border-radius: 0;
        border-radius: 0;
        -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        -webkit-transition: opacity .218s;
        transition: opacity .218s;
        background: #fff;
        border: 1px solid #ccc;
        border: 1px solid rgba(0,0,0,.2);
        cursor: default;
        outline: none;

      .settings-options a{
        text-decoration: none;
        color: black;
        padding-left: 20px;

      .settings-options li{
        width: 180px;
        margin-top: 3px;

      .settings-options li:hover{
        background-color: #F0F0F0;
    <div class="settings">
      <div class="cog"></div>
      <div class="down-arrow">&nbsp;</div>
    <ul class="settings-options">
      <li><a href="#">This is Option 1</a></li>
      <li><a href="#">This is Option 2</a></li>
      <li><a href="#">This is Option 3</a></li>

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
      $(".settings").on("click", function(){

Please be aware that the images are probably copyright, so you may have to find your own versions.
You also don’t need jQuery to do the show/hide thing, but I was feeling lazy.

Here’s a demo.

Many thanks Pullo.

It works. I will use new different images for setting buttons.


Hi Pullo,

One small change when we click outside then popup do not close.

Any idea?


Sure :slight_smile:
I would attach a click event listener to the document which, when it detects a click, checks if the menu is visible and reacts accordingly.

Hi Pullo,

Any update.



See my previous post. That’s how I’d do it :slight_smile: