[英]blur() event is not working on IPAD and Iphone
I have tried blur()
for replacing the css but that function is not working.我尝试用
blur()
替换 css 但 function 不起作用。 I did research on it that blur()
is not work for IOS device.我对此进行了研究,
blur()
不适用于 IOS 设备。 Is there any other way to remove position
from .body-clip-overflow
when focus is out from input field.当焦点不在输入字段时,是否有任何其他方法可以从
.body-clip-overflow
中删除position
。 My code is attached below.我的代码附在下面。 Link
关联
$(document).on('focus', 'input, textarea', function() {
$('.body-clip-overflow').css('position', 'fixed');
$('.ui-dialog').css('position', 'absolute');
$('.ui-dialog').css('top', '80px');
});
$(document).on('blur', 'input, textarea', function() {
setTimeout(function() {
$('.body-clip-overflow').css('position', 'relative');
}, 100);
});
Try this:尝试这个:
$(document).live('blur', function () {
//some code
});
or try 'keyup':或尝试“keyup”:
$(document).live('keyup', function () {
//some code
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.