Looking for Jquery menu script , please help

Discussion in 'JavaScript' started by deriklogov, Nov 23, 2014.

  1. #1
    Hi,
    I am looking for jquery script which would list of states on site in vertical and when ever you click on state it will show list of cities.
    Script similar to http://www.kijiji.ca they using it to select location.

    Thank You
    Please help to find one
     
    deriklogov, Nov 23, 2014 IP
  2. Pigeon Yoga

    Pigeon Yoga Active Member

    Messages:
    52
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    63
    #2
    Could you provide a better example of what you're looking for?
     
    Pigeon Yoga, Jan 4, 2015 IP
  3. freelanceDeveloper

    freelanceDeveloper Member

    Messages:
    59
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    43
    #3
    1- create 3 divs (or a table if you prefer)
    2- list the states using php (or ajax if you'ld like) in the first element and add an onclick event to the items
    3- when onclick event is triggered do an ajax call to collect the data and populate div 2 and add an event on those as well

    edit : ok they do it differently :) ... you could as well load everything in 1 array and get the data based on array keys...
     
    Last edited: Jan 11, 2015
    freelanceDeveloper, Jan 11, 2015 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    Why... Make it a FORM - that way it will also work if the javascript is NOT present. Put all the states in a dropdown (select-input), and depending on which one is chosen, you show only the relevant cities (make an onchange-event) - you can even do a selection of available / non-available cities in the second drop-down, with optgroups disabled/not disabled - that way the whole list will be there, but it won't be possible to select anything not related - you can also "jump" to the proper optgroup based on what selection you chose from the first select.
     
    PoPSiCLe, Jan 11, 2015 IP