Determine page type in javascript?

Matt Sones
Matt Sones 💎💎💎
edited March 2, 2017 in Questions
Hi Team!

Is there a method I can use in javascript to determine if a page is Mobile or Desktop?

Comments

  • Zach McElrath
    edited March 2, 2017
    You can check whether "skuid.mobile" is defined --- if it is, you're in Mobile, otherwise in Desktop, e.g.

    var isMobile = !!skuid.mobile;
    if (isMobile) {

    }
  • Matt Sones
    Matt Sones 💎💎💎
    edited February 10, 2017
    Nice. Thanks!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!