Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2009
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Interactive category picker/selector?

    I would appreciate if anyone could guide my point by point on how one could create a category picker just like gumtree (preferably in jquery):

    http://www.gumtree.com/add_posting.html?location_id=uk

    Specifically the points

    • How clicking on a category opens another to the right
    • How clicking on a category appends a variable like "#cat-10201" into the url (and vice versa)
    • How css lists are used instead of form select menus (making it easily styled)
    • How clicking on a deep subcategory automatically preselects all parent categories


    I'm not looking for anyone to actually code it for me (that would be outrageous ) but tips on how it's actually structured and steps on how it can be coded would be highly appreciated. I can do PHP and I know CSS also. I don't know plain javascript but I'm sure I can do most of it in jQuery

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,460
    Thanks
    11
    Thanked 600 Times in 580 Posts
    use <a href="section"> tags to change the url.

    use a nested ul. use css to make it look like the example, but "stuck" on one section, just for testing. then make it look like the example when there is nothing selected.

    onclick, hide all kids, then unhide the one you clicked on, it's kids, and it's parents.
    my site (updated 2014/10/20)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.3, IE11:9.2, IE9:2.7, IE10:2.6, FF:16.8, CH:47.5, SF:7.8, NON-MOUSE:37%


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •