-3
这是错误的补丁:我该如何解决无效的正则表达式?
这里是在iPhone设备我的隐藏模式代码
$(document).ready(function(){
var modal = $('.myModal', window.top.document); // Works
modal.on('show.bs.modal', function(e) {
var width = $(window).width();
var testdevice = /iPhone/i.test(navigator.userAgent);
if(testdevice) {
$(this).modal('toggle');
}
});
});
嗨..你正在尝试要使用这个正则表达式 – Shibon
我想在iPhone设备中隐藏模式。 @Shibon –
嗨请看这个链接他们已经完成 http://stackoverflow.com/questions/3514784/what-is-the-best-way-to-detect-a-mobile-device-in-jquery – Shibon