Change a drop down into a list for selecting category

i have a free classified website ( which allows users to post free ads and in the add posting page it is having the drop down for selecting the category. the user have to select the parent category and then the child category. i want to make it user friendly like the is having. it is showing the parent category as a list and when user clicks it than the child category is sliding out. please help me to change my drop down into a list.

if there is any jquery or javascript already exist to simply my task please tell me that also…

I looked at the second site you mentioned, but I couldn’t see the effect you describe. When I clicked on “Post free ad now!” I saw a list of main categories, but when I clicked on one of these, a secondary menu appeared, but nothing was animated. Is this what you mean?

yes i want to change my drop down similar to that one you can take a look at mine at my page to

please help me to change it

That’s known as a fly out menu (kind of). Here a list of 10 fly-out menu plugins (with demos). Maybe something like that is what you’re looking for.

Otherwise, it wouldn’t be very hard to implement this yourself.


<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
        width: 150px;
        position: absolute;

      li > ul{
        display: none;
        top: 0;

        background-color: yellow;
    <ul id="nav">
        <a href="#">Item 1</a>
          <li>Item 1a</li>
          <li>Item 1b</li>
          <li>Item 1c</li>
        <a href="#">Item 2</a>
          <li>Item 2a</li>
          <li>Item 2b</li>
          <li>Item 2c</li>

    <script src=""></script>
      $("#nav a").on("click", function(e){
        $("li > ul").hide();
        $(this).next().css("display", "inline-block");

I’m assuming you’re using jQuery already. Otherwise it’s not really necessary for the snippet I provided.

will try to implement what you said…and reply the result…thank you sir.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.