Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Mobile width cutoff

Hi, is it possible to set another width cutoff for the use of mobile grids, mobile CBC, etc. than the standard 800px screenwidth?
Something like "var widthCutoff = 800;" in "Drag-to-Container Ranking Unless Mobile".
asked Oct 1, 2021 by ingo Bronze (710 points)

1 Answer

0 votes
I'm not exactly sure what you are trying to do, but it sounds like you want more control over mobile mode.  

I have a trick that might be helpful.  We determine if we go into mobile mode by what the screen size is on the prior page.  If the screen size is 800 px or less we go into mobile mode on the next page.  If it is more than 800 we stay in desktop mode.

To control this you can put the code below on one of your pages.  The next page after the page this is placed on will be affected.

<script>
    function SetScreenWidth() {
        if ($("#hid_screenwidth").length) {
            $("#hid_screenwidth").val(801);
        }
    }
</script>

See the "801" above.   This will force the next page to be desktop.  If that value was "800" or less the next page would be mobile.
answered Oct 1, 2021 by Justin Luster Silver Sawtooth Software, Inc. (8,300 points)
Hi Justin, thank you for your quick response. The idea was to use the "mobile" mode only for devices smaller than say 600 px instead of the standard 800 px. Would this be possible?
Try something like below.  You can put it in the global head tag.

<script>
    function SetScreenWidth() {
        if ($("#hid_screenwidth").length) {
            var width = SSI_ScreenWidth();
            var change_width = 0;

            if (width <= 600) {
                change_width = 600;
            } else {
                change_width = 900;
            }

            $("#hid_screenwidth").val(change_width);
        }
    }
</script>
...