Grow your CSS skills. Land your dream job.

How do you trigger Jquery function when dropdown menu option is clicked?

  • # June 6, 2013 at 10:48 pm

    Not sure why but jquery functions don’t trigger when i click the option of a dropdown menu. Even when everything is attached. How can i have the option.click trigger the animate function?http://codepen.io/Jarolin/pen/jHtxf

    # June 6, 2013 at 11:57 pm

    You can’t. But you can watch for the `

    # June 7, 2013 at 6:38 am

    I need to attach an individual function to each option of the select menu. I cant do it with that.

    # June 7, 2013 at 6:45 am

    But you can trigger a function based on a value can’t you?

    My Jquery-fu is weak. :)

    # June 7, 2013 at 7:02 am

    @Paulie_D yeah you can. So you would use the change, and then find out what the selected value of the select element is and then do something based on that value.

    http://codepen.io/JamyGolden/pen/IDqKA

    # June 7, 2013 at 7:42 am

    @jamy_za Thanks. ill try using your code later today.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".