Hi Osa,
As you say, jQueryMobile is deprecated, so keep it in "desktop" mode.
>> but with userAgent i capture if window version
don't do that. User Agents are changing all the time, so over the years your program will "rot".
The better approach is the other half of Don's reply - use media queries.
@media only screen and (max-width: 600px) {
.mycustomclass {
visibility: hidden;
}
}
This allows you to hide/unhide things based on the _screen size_ which is really what it's all about.
There are some classes built-in which will help with this.
if-not-small,
if-large
if-medium
So for example, if you want a field to disappear when the screen is small add the class if-not-small to it. Or if you want a field to appear only if the screen is large then use if-large on it and so on.
The key is;
a) stop thinking about "mobile" and "desktop" - we need to stop thinking of those terms.
b) think about "screen size" - that's really all that matters... because screen size changes the _tasks_ that we do with the device.
cheers
Bruce