forked from olton/metroui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-screen.js
More file actions
35 lines (30 loc) · 883 Bytes
/
Copy pathstart-screen.js
File metadata and controls
35 lines (30 loc) · 883 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
(function($) {
$.StartScreen = function(){
var plugin = this;
plugin.init = function(){
setTilesAreaSize();
addMouseWheel();
};
var setTilesAreaSize = function(){
var groups = $(".tile-group");
var tileAreaWidth = 160;
$.each(groups, function(i, t){
tileAreaWidth += $(t).outerWidth()+46;
});
$(".tile-area").css({
width: tileAreaWidth
});
};
var addMouseWheel = function (){
$("body").mousewheel(function(event, delta){
var scroll_value = delta * 50;
$(document).scrollLeft($(document).scrollLeft() - scroll_value);
return false;
});
};
plugin.init();
}
})(jQuery);
$(function(){
$.StartScreen();
});