Black Studio Touch Dropdown Menu
Detect second click outside of clicked menu item? (3 posts)

  1. Ov3rfly
    Posted 3 years ago #

    An interesting plugin, tested with Android 4.0.4 stock browser and a Twenty Ten child theme, works fine, thanks.

    Idea for enhancement for the author or interested readers:

    If the second touch/click (after the submenu is opened with the first) is somewhere outside of the menu area, the submenu closes again. In this case $this.data('dataNoclick') is not reset. Another touch/click on top menu then opens the url instead of the submenu.

    Maybe it is possible to add some mechanism like $(document).one('click', function() {.. or similar with a certain condition in js or some css :not selector as param of .one() or similar after the first touch/click, and reset all the dataNoclick from there to catch the above situation?

    Sounds complicated, but maybe you come up with a nice solution.


  2. Marco Chiesi
    Plugin Author

    Posted 3 years ago #

    Thanks for the suggestion. I'll try to implement it in next releases.

  3. Ov3rfly
    Posted 3 years ago #

    Thanks for feedback.

    Such code needs careful testing though as it could interfere easily with other jquery on a website.

    If implemented, I would suggest to provide two .js files, one default without that functionality and one enhanced with the extra code and only use the new one via an option/filter for admins via function.php

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Black Studio Touch Dropdown Menu
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.