09 2012 档案

摘要:在ipad/iphone开发中我们往往需要判断用户目前的屏幕的位置,这样加以优化显示应用内容。今天这里我们分享一个jQuery的代码,能够有效帮助大家判断横屏或者竖屏。注意这里调用了jQuery的方法,所以你需要引用jQuery类库。function orient() { alert('gete'); if (window.orientation == 0 || window.orientation == 180) { $("body").attr("class", "portrait"); orientation = 阅读全文
posted @ 2012-09-07 13:52 冰镇宝贝321 阅读(577) 评论(0) 推荐(0) 编辑