Need body trigger added or auto hide added for mobile – please : )

Resolved 7 posts from 3 participants
  • Started 7 years, 10 months ago ago by nathan S.
  • Replied 3 years, 11 months ago ago by Thomas N.
Viewing 8 posts - 1 through 8 (of 8 total)
  • #1218

    nathan S.

    I love your plugin and how you integrated into the menu system – awesome … I would love it if you might also include some code so that the menu will work same on mobile devise!

    Everything works great on mobile except the hover effect doesn\’t because on mobile it requires a click to drop down the menu – this makes the menu drop down but doesn\’t allow for it to hide after you click or make selection and thus covers the page… I would love to donate and share this plugin and hope to use but hoping you might include this code in update or email…

    #1219

    Constantin

    Thank you, happy to hear you like the plugin. Regarding mobile, the plugin is still young so your suggestion is more than welcomed, we’ll see what we can be done and update as soon as a suitable solution is found. If there are any other issues/improvements you need for it, we’d love to hear about them.

    Instead of a donation, we’ll appreciate more if you would rate the plugin on WP website. I’ll keep you posted once the issue gets solved, thank you for taking the time to write us about this.

    #1243

    Constantin

    Version 1.1 for CodeFlavors Floating menu has just been released. One of the things we updated is a new option that removes the menu on mobile devices. We’re still trying to figure out a way to make things work on mobile devices but the tap event is a bit tricky.

    As always, we’re open to suggestions, if you have an idea on how to solve this, we’re more than happy to take it into account. Thank you for raising the issue, hope the update solves some of the problems.

    #2517

    Thomas N.

    Thanks for a great plugin.

    Is it possible to add a width option in the code beneath?
    Like if the browser is less then 1024px wide, hide menu!?

    if ( empty($_SERVER['HTTP_USER_AGENT']) ) {
    		$is_mobile = false;
    	} elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false // many mobile devices (all iPhone, iPad, etc.)
    		|| strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false
    		|| strpos($_SERVER['HTTP_USER_AGENT'], 'Silk/') !== false
    		|| strpos($_SERVER['HTTP_USER_AGENT'], 'Kindle') !== false
    		|| strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') !== false
    		|| strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false ) {
    			$is_mobile = true;

    Thanks 🙂

    #2518

    Constantin

    Hi,

    No, PHP can’t determine the width of the screen. You could use media queries in CSS though and make this happen.

    #2519

    Thomas N.

    Okay, good idea, do you have suggesten on how the CSS code should look like, I mean what would you write in Css that could hide the Floating Menu?

    Thanks 🙂

    #2521

    Constantin

    You should hide element #cfn_floating_menu, for example:


    #cfn_floating_menu{
    display: none;
    }

    More about media queries can be found here: https://goo.gl/hweMC0

    #2522

    Thomas N.

    Great, I added this and it is working perfectly 🙂

    @media only screen and (max-width: 1024px) {
    #cfn_floating_menu.right{
    display: none;
    }
    }

    And I have installed a Mobil menu plugin, that works when the screen/browser is 1024px wide.

    Thanks for all your help! 🙂

    A note to others your menu is in the left side, use this:

    @media only screen and (max-width: 1024px) {
    #cfn_floating_menu.left{
    display: none;
    }
    }
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.