2014年12月27日 星期六
javascript jquery 判斷是否手機版、平板、mac、pc include 相對應 js 響應式用
Posted on
清晨7:14
by
Unknown
if( !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
// not mobile
if (navigator.userAgent.indexOf('Mac OS X') != -1) {
//is Mac
} else {
//is PC
}
}else{
// is mobile
}
用 jquery load 外部 js
$.getScript( "js/SmoothScroll.js" );
訂閱:
張貼留言
(
Atom
)
0 意見 :
張貼留言