• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Disable widget only in mobile - possible

Scheduled Pinned Locked Moved Technical Support
8 Posts 4 Posters 2.4k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • codejetC Offline
    codejetC Offline
    codejet GNU/Linux
    wrote on last edited by
    #1

    Is it possible to disable a widget in mobile , but leave it on in desktop

    1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by
    #2

    It is planned https://github.com/NodeBB/NodeBB/issues/2302

    codejetC 1 Reply Last reply
    1
  • codejetC Offline
    codejetC Offline
    codejet GNU/Linux
    replied to <baris> on last edited by
    #3

    @baris thanks

    1 Reply Last reply
    0
  • A Offline
    A Offline
    a_5mith
    wrote on last edited by
    #4

    For now just wrap it in a div and use a media query to set that div to display:none below a certain viewport.

    codejetC 1 Reply Last reply
    2
  • codejetC Offline
    codejetC Offline
    codejet GNU/Linux
    replied to a_5mith on last edited by codejet
    #5

    @a_5mith what would the the query look like that can differentiate between mobile and desktop

    can you use navigator.userAgent.match(/iPhone/i) etc..

    don't currently have phone to check , but will try work some code up when I have access.

    maybe you can use it in your ACP - disable for mobile devices checkbox on widget

    1 Reply Last reply
    0
  • A Offline
    A Offline
    a_5mith
    wrote on last edited by
    #6
    @media only screen and (max-width : 480px) {
    .div-name {
    display:none;
    }
    }
    
    Think that's right, might be min-width. On an iPad so can't check.
    1 Reply Last reply
    1
  • A Offline
    A Offline
    a_5mith
    wrote on last edited by
    #7

    In fact bootstrap has a no-mobile class you can use already. I just don't remember it.

    1 Reply Last reply
    0
  • pichaliteP Offline
    pichaliteP Offline
    pichalite Plugin & Theme Dev
    wrote on last edited by
    #8

    hidden-xs

    1 Reply Last reply
    1

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development