location /node/ {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_pass http://socket_nodes;
}
upstream socket_nodes {
ip_hash;
server 127.0.0.1:8095;
}
.fixed{
position: fixed;
top: 0;//отступ сверху
right: 0; //прижали вправо
}
var needOffset = 500;
$(window).scroll(function(event){
if($(window).scrollTop() >= needOffset){
$('.block_fixed').addClass('fixed');
}else{
$('.block_fixed').removeClass('fixed');
}
});
function show() {
var perimetr_one = parseFloat(document.getElementById('perimetr_one').value);
var perimetr_two = parseFloat(document.getElementById('perimetr_two').value);
var perimetr_three = parseFloat(document.getElementById('perimetr_three').value);
var perimetr_four = parseFloat(document.getElementById('perimetr_four').value);
var result = perimetr_one + perimetr_two + perimetr_three + perimetr_four;
document.getElementById('perimetr').innerHTML = "Периметр равен: " + result;
}