Hi Support,
I would like to implement a custom JS via PHP module, which should be loaded only on desktop. Does Burnengine has some sort of function, variable or class telling me, if user is on mobile?
Something like
if ($tbData->isMobile) {}
Thanks,
Axanne
|
|
Hi Axanne,
We’ve removed all server side device detection and for the moment use only JS to detect screen size or touch screen options:
// Check for screen size
if (tbApp.windowWidth < 768) {
// do something
}
// Check for touch screen
if (tbUtils.is_touch) {
// do something
}
P.S. Have in mind that these checks can be used only in Javascript.
BR,
ThemeBurn team
|
|
Ok, thanks. Will use the JS code for my logic.
|
|
Glad we’ve helped.
BR,
ThemeBurn team
|
|