HI朋友我必須在手機上打開時禁用視差效果腳本。 我發現了一個類似於我想要和改編的腳本,但它不起作用。任何人都知道什麼是錯的?爲手機禁用腳本
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
Opera: function() {
return navigator.userAgent.match(/Opera Mini/i);
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i);
},
any: function() {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
}
};
jQuery(document).ready(function(){
if(!isMobile.any()){
$(window).stellar(): false;
}
});
你覺得呢'$(窗口).stellar():假;'不? – epascarello