0
我有一些jQuery的,但希望它只能运行当iPad处于纵向模式时,将鼠标悬停在iPad(横向模式)处理脚本...检测的iPad在纵向与jQuery
var portraitWidth = $(window).width(); //detect the iPad in Portrait orientation
if (portraitWidth < 769) {
$('.model-selector h2:first-child').toggle(function() {
$(this).parent().animate({
top: '-138px'
}, 250);
}, function() {
$('.model-selector').animate({
top: '-45px'
}, 250);
});
}
我究竟做错了什么?
在此先感谢..