-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
34 lines (28 loc) · 976 Bytes
/
app.js
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
var app = {
init: function() {
// test console.log();
// console.log('app.init OK');
// les variables
app.positionFlou(175,325);
// les écouteurs
$('.slider_height').on('click', app.positionFlou);
$('.slider_width').on('click', app.positionFlou);
// les fonctions lancées
},
positionFlou: function(){
$('.area_blur').removeAttr('style');
$('.background_blur').removeAttr('style');
$('.area_overBlur').removeAttr('style');
var top = $('input[name=hauteur]').val();
var left = $('input[name=largeur]').val();
$('.area_blur').css('left', '+='+left);
$('.area_blur').css('top', '+='+top);
var pos = $('.area_blur').position();
$('.background_blur').css('left', '-='+pos.left);
$('.background_blur').css('top', '-='+pos.top);
$('.area_overBlur').css('top', '+='+pos.top);
$('.area_overBlur').css('left', '+='+pos.left);
$('.area_overBlur').css('z-index', 20);
},
};
$(app.init);