- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
var normalWidth = 1440 + 20;
var maxStep = 720;
var eDivSizeWidth = 1440;
var eDivBodyEndWidth = 1400;
var eSearchInputWidth = 920;
var eSearchButtonLeft = 1210;
var eCartButtonLeft = 1260;
function onWindowResize()
{
var step = normalWidth - innerWidth;
if (step < 0)
step = 0;
else if (step > maxStep)
step = maxStep;
document.getElementById('divSize').style.width = eDivSizeWidth - step;
document.getElementById('divBody').style.width = eDivBodyEndWidth - step;
document.getElementById('divEnd').style.width = eDivBodyEndWidth - step;
document.getElementById('mainSearch').style.width = eSearchInputWidth - step;
document.getElementById('searchButton').style.left = eSearchButtonLeft - step;
document.getElementById('cartButton').style.left = eCartButtonLeft - step;
}
window.onresize = function() { onWindowResize(); };
window.onload = function() { onWindowResize(); };
Комментарии (0) RSS
Добавить комментарий