[英]How to have two different types of calendars on the same form?
I am interested in changing the calendar depending if the site is being browsed on a mobile or desktop. 我对更改日历感兴趣,具体取决于在移动设备还是台式机上正在浏览该网站。
This jQuery has both a calendar mode and an Android mode. 该jQuery具有日历模式和Android模式。 http://dev.jtsage.com/jQM-DateBox/
http://dev.jtsage.com/jQM-DateBox/
How can I get it to change depending on the browser size? 如何根据浏览器大小进行更改?
Would I use something like this 我会用这样的东西吗
document.documentElement.clientWidth
It would be better to detect browser user_agent and display jquery calendar accordingly. 最好检测浏览器user_agent并相应地显示jquery日历。 Following is a code example:
以下是一个代码示例:
if(navigator.userAgent.indexOf("Android") >= 0 || navigator.userAgent.indexOf("iPhone") >= 0) {
// Show mobile calendar
} else {
// Show desktop calendar
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.