-1

i am new to this,so can one give reference to create multilevel drop down list. As explain belove. for example, I have to create two dropdown list one is category and another is sub category. When i am select one field in category then sub categoey will give me only those field which is sub part of category.. if i am select category1 then category-1----->in subcategory dropdown sub1,sub2 are display category-2----->sub3,sub4,sub5 like wise....

Trilok Patel
  • 21
  • 2
  • 13
  • possible duplicate of [Dynamic multi-level drop down using MySQL DB](http://stackoverflow.com/questions/13111821/dynamic-multi-level-drop-down-using-mysql-db) – Arun Feb 23 '15 at 12:06
  • Please paste your tried code :) – I'm Geeker Feb 23 '15 at 12:09
  • Refer [bootstrap multi-level dropdown](http://bootsnipp.com/snippets/featured/multi-level-dropdown-menu-bs3) or [pure css multi-level dropdown](http://stackoverflow.com/questions/9100344/pure-css-multi-level-drop-down-menu) – adarsh hota Feb 23 '15 at 12:14
  • i am not try any thing i want some reference so i can start to code – Trilok Patel Feb 23 '15 at 12:16

1 Answers1

0

Here is simple solution.

// HTML
<ul>
    <li>
    <a href="#">A ></a>
      <ul>
         <li><a href="#">A1 ></a>
              <ul>
                 <li><a href="#">A1A ></a>
                      <ul>
                         <li><a href="#">A1A1</a></li>
                         <li><a href="#">A1A2</a></li>
                      </ul>
                  </li>
                 <li><a href="#">A1B</a></li>
              </ul>
          </li>
         <li><a href="#">A2</a></li>
      </ul>
   </li>
   <li><a href="#">B</a></li>
</ul>

// CSS
ul li > ul{
    display:none;
}

ul li:hover >ul{
    display:block;
}

jsfiddle example

Walter White
  • 359
  • 3
  • 17
  • i can use anything either php or java script or jquery or AJAX. In what ever it is possible just give me reference for that. – Trilok Patel Feb 23 '15 at 12:29