Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Run a script only for desktop users?

    Hello all,

    I'm pretty inexperienced with javascript, but I found a tutorial on creating a "floating" navigation bar. We use it for a vertical left-navigation as opposed to the horizontal navigation used in the guide:

    http://www.dwuser.com/education/cont...vigation-menu/

    It ended up working great, aside from one problem: on mobile devices, if you zoom, the menu sticks to the left side of the screen, rather than staying within it's div on the left side of the page.

    I'm not sure if there's any way to fix that, but if there's not, I was hoping that I could at least somehow tell the script only to run on non-mobile devices, if that's at all possible.

    Here is the page I am using it on, just for reference:

    https://www.savvyboater.com/boat-cov...-and-tips.aspx

    Thanks for any and all help!

    Kyle

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,919
    Thanks
    79
    Thanked 4,423 Times in 4,388 Posts
    Shrink your browser window way down vertically and/or change the zoom factor and you have similar problems even with desktop browser.

    With Chrome, and with zoom set at 200%, at one point the Nav menu moved halfway off the screen and I couldn't get it back except by refreshing the page.

    So the whole thing seems to have issues.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •