WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Ov3rfly
    Member
    Posted 1 year 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.

    http://wordpress.org/extend/plugins/black-studio-touch-dropdown-menu/

  2. Marco Chiesi
    Member
    Plugin Author

    Posted 1 year ago #

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

  3. Ov3rfly
    Member
    Posted 1 year 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

About this Topic

Tags

No tags yet.