WordPress.org

Ready to get started?Download WordPress

Forums

CM Tooltip Glossary
[resolved] Making it touch devices compatible (3 posts)

  1. Fredovsky
    Member
    Posted 1 year ago #

    Hi,

    I'd like the plugin to be compatible on touch devices. Once the tooltip is displayed on the iPad for example, I can't hide it afterwards.

    I'm trying to find what to add in the glossary.php file, it should be something like :

    onTouchSomewhereElse=tooltip.hide().

    I can figure out the onTouchSomewhereElse part of it :)

    Thanks for any help.

    http://wordpress.org/extend/plugins/enhanced-tooltipglossary/

  2. Fredovsky
    Member
    Posted 1 year ago #

    I found a way which works out almost perfectly, but might not well implemented...

    Modifications to make :

    in tooltip.js :

    I added a variable visible=false; that becomes true when show() is called and false when hide() is called.

    Then below the hide() function I added my own toggle function :

    toggle:function(v,w){
                        if (visible){
                            tooltip.hide();
                        }else
                            {
                            tooltip.show(v,w);
                            }
    
                    }

    then in glossary.php add this after the onmouseover and onmouseout events :

    onClick="tooltip.toggle(\'' . $glossaryItemContent . '\');"

    Onlydownside is if you click on your glossary word the tooltip will disappear even if you are still hovering it. (Links to the glossary page have to be disabled).

  3. CM Plugins
    Member
    Plugin Author

    Posted 1 year ago #

    We added onclick event on tooltip, so if you using touch device, you just need to click on the tooltip to hide it. (Ver 1.6)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.