-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