var u =navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
if (isAndroid) {
// android監(jiān)聽鍵盤彈起底部影藏
? ? var clientHeight =document.documentElement.clientHeight ||document.body.clientHeight;
? ? $(window).on('resize', function () {
var nowClientHeight =document.documentElement.clientHeight ||document.body.clientHeight;
? ? ? ? if (clientHeight > nowClientHeight) {
$('.footer').hide();
? ? ? ? }
else {
$('.footer').show();
? ? ? ? }
});
}
if (isiOS) {
// ios監(jiān)聽鍵盤彈起底部影藏
? ? $(document).on('focusin', function () {
$('.footer').hide();
? ? });
? ? $(document).on('focusout', function () {
$('.footer').show();
? ? });
}