forked from fred9702/fred9702.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
35 lines (26 loc) · 799 Bytes
/
script.js
File metadata and controls
35 lines (26 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$.stellar();
(function(){
//Checking user agent device
var ua = navigator.userAgent,
isMobileWebKit = /WebKit/.test(ua) && /Mobile/.test(ua);
if (isMobileWebKit) {
$(html).addClass('mobile');
}
$(function(){
var iScrollInstance;
if (isMobileWebKit) {
iScrollInstance = new iScroll('wrapper');
$('#scroller').stellar({
scrollProperty: 'transform',
positionProperty: 'transform',
horizontalScrolling: false,
verticalOffset: 150
});
} else {
$.stellar({
horizontalScrolling: false,
verticalOffset: 150
});
}
});
})();