javascript - Drop down menu not closing jquery -


What I'm trying to do is drop down menu, and automatically shut down by clicking the item inside the user's menu The menu is now working, but because I'm using

  • to close the menu, I'm having a lot of problems, so I decide to change but it does not work. This is a function that works
      $ ("li"). Click (function (event) {$ (this) .closest ("div"). Hide ("slow");});   

    But this is not a

      $ ("hideM"). Click (function (event) {$ (this) .closest ("div"). Caution ("slow");});     

    change it

      $ ("HideM"). Click (function (event) {$ (this) .closest ("div"). Hide ("slow");}); Click (function) {$ (this) .closest ("div").   

    To

      $ ("# hideM" ). ("Slow");});   

    If you are using id as your jquery selector, you should enter # Prefix is ​​required.



  • Comments

    Popular posts from this blog

    Java - Error: no suitable method found for add(int, java.lang.String) -

    java - JPA TypedQuery: Parameter value element did not match expected type -

    c++ - static template member variable has internal linkage but is not defined -