Шитпостинг

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Шитпостинг » Обои для рабочего стола » Авиация


Авиация

Сообщений 1 страница 10 из 135

1

http://www.zastavki.com/pictures/1024x768/2011/Aviation______32___031223_.jpg
http://www.zastavki.com/pictures/1024x768/2011/Aviation_Gulfstream_G550_031131_.jpg
http://www.zastavki.com/pictures/1024x768/2011/Aviation_F-35_Lightning_II_031084_.jpg
http://www.zastavki.com/pictures/1024x768/2011/Aviation_Military_transport_aircraft_031043_.jpg
http://www.zastavki.com/pictures/1024x768/2011/Aviation_Airplane_in_the_sky_031022_.jpg
http://www.zastavki.com/pictures/1024x768/2011/Aviation_Aircraft_in_flight_030950_.jpg
http://www.zastavki.com/pictures/1024x768/2011/Aviation_Helicopter_Ka_52_030918_.jpg
http://www.zastavki.com/pictures/1024x768/2011/Aviation_Su-24_bombers_030904_.jpg
http://www.zastavki.com/pictures/1024x768/2011/Aviation_Grumman_F-14_Tomcat_030819_.jpg

2

sdsd

3

jhhijo

4

Код:
<div id="resizable" style="background-color: blue; width: 100px; height: 100px; position: relative;"></div>

<script>
let resizable = document.getElementById("resizable");
let handler = document.createElement("div");
handler.style.width = "100%";
handler.style.height = "10px";
handler.style.backgroundColor = "gray";
handler.style.position = "absolute";
handler.style.bottom = "0";
handler.style.cursor = "ns-resize";
resizable.appendChild(handler);

let startY, startHeight;
let isResizing = false;

resizable.addEventListener("mousedown", initDrag);
resizable.addEventListener("touchstart", initDrag);
handler.addEventListener("mousedown", initResize);
handler.addEventListener("touchstart", initResize);

function initDrag(e) {
  if (isResizing) return; // prevent dragging when resizing
  e.preventDefault();
  let startX = e.clientX || e.touches[0].clientX;
  let startY = e.clientY || e.touches[0].clientY;
  let offsetX = resizable.offsetLeft;
  let offsetY = resizable.offsetTop;
  document.addEventListener("mousemove", drag);
  document.addEventListener("touchmove", drag);
  document.addEventListener("mouseup", stopDrag);
  document.addEventListener("touchend", stopDrag);

function drag(e) {
let clientX = e.clientX || e.touches[0].clientX;
let clientY = e.clientY || e.touches[0].clientY;
let left = offsetX + clientX - startX;
let top = offsetY + clientY - startY;
if (left < 0) {
left = 0;
}
if (top < 0) {
top = 0;
}
if (left + resizable.offsetWidth > window.innerWidth) {
left = window.innerWidth - resizable.offsetWidth;
}
if (top + resizable.offsetHeight > window.innerHeight) {
top = window.innerHeight - resizable.offsetHeight;
}
resizable.style.left = left + "px";
resizable.style.top = top + "px";
}

function stopDrag() {
document.removeEventListener("mousemove", drag);
document.removeEventListener("touchmove", drag);
}
}

function initResize(e) {
isResizing = true; // set the flag to indicate that resizing is in progress
e.preventDefault();
startY = e.clientY || e.touches[0].clientY;
startHeight = resizable.clientHeight;
document.addEventListener("mousemove", resize);
document.addEventListener("touchmove", resize);
document.addEventListener("mouseup", stopResize);
document.addEventListener("touchend", stopResize);
}

function resize(e) {
let clientY = e.clientY || e.touches[0].clientY;
let newHeight = startHeight(clientY - startY);
if (newHeight < 0) {
newHeight = 0;
}
if (newHeight + resizable.offsetTop > window.innerHeight) {
newHeight = window.innerHeight - resizable.offsetTop;
}
resizable.style.height = newHeight + "px";
}
function stopResize() {
document.removeEventListener("mousemove", resize);
document.removeEventListener("touchmove", resize);
isResizing = false; // reset the flag to indicate that resizing has stopped
}
</script>

5

Код:
jQuery(document).on('click touchstart mouseup', function(event) {
    if (!jQuery(event.target).closest('.bb-popup, .chx-color-bb-prompt, .chx-image-bb-prompt, .chx-link-bb-prompt, .chxicon-plus').length && this.getSelection().toString() == "") {

        jQuery('.bb-popup, .chx-color-bb-prompt, .chx-image-bb-prompt, .chx-link-bb-prompt').fadeOut("fast");
    }
});

6

Код:
document.addEventListener("click", function(event) {
    if (!event.target.closest('.bb-popup, .chx-color-bb-prompt, .chx-image-bb-prompt, .chx-link-bb-prompt, .chxicon-plus') && window.getSelection().toString() == "") {
        let elements = document.querySelectorAll('.bb-popup, .chx-color-bb-prompt, .chx-image-bb-prompt, .chx-link-bb-prompt');
        elements.forEach(function(element) {
            element.style.display = "none";
        });
    }
});

7

Код:
var chatx = document.getElementById("chatx");
var chx_header = document.querySelector(".chx_header");

chatx.addEventListener("mousedown", function(event) {
  if (event.target === chx_header) {
    event.preventDefault();
    var mousePosition;
    var offset = [
      chatx.offsetLeft - event.clientX,
      chatx.offsetTop - event.clientY
    ];
    var windowWidth = window.innerWidth;
    var windowHeight = window.innerHeight;
    var chatxWidth = chatx.offsetWidth;
    var chatxHeight = chatx.offsetHeight;

    document.addEventListener("mousemove", function(event) {
      mousePosition = {
        x : event.clientX,
        y : event.clientY
      };

      chatx.style.left = (mousePosition.x + offset[0]) + 'px';
      chatx.style.top = (mousePosition.y + offset[1]) + 'px';

      // containment
      if (chatx.offsetLeft < 0) {
        chatx.style.left = "0px";
      }
      if (chatx.offsetLeft + chatxWidth > windowWidth) {
        chatx.style.left = windowWidth - chatxWidth + 'px';
      }
      if (chatx.offsetTop < 0) {
        chatx.style.top = "0px";
      }
      if (chatx.offsetTop + chatxHeight > windowHeight) {
        chatx.style.top = windowHeight - chatxHeight + 'px';
      }
    });

    document.addEventListener("mouseup", function() {
      document.removeEventListener("mousemove", null);
      var chat_custom_position = {};
      chat_custom_position[chatx.id] = {
        left: chatx.offsetLeft,
        top: chatx.offsetTop
      };
      localStorage.setItem("chat_custom_position", JSON.stringify(chat_custom_position));
    });
  }
});

8

Код:
document.querySelector('.bb-container').addEventListener('click', function(event) {
  if (event.target.matches('.bb1')) {
    bbtags("shoutbox-comment", "[b]", "[/b]");
  } else if (event.target.matches('.bb2')) {
    bbtags("shoutbox-comment", "[u]", "[/u]");
  } else if (event.target.matches('.bb3')) {
    bbtags("shoutbox-comment", "[i]", "[/i]");
  } else if (event.target.matches('.bb4')) {
    // Code to handle bb4
  } else if (event.target.matches('.bb5')) {
    // Code to handle bb5
  } else if (event.target.matches('.bb6')) {
    // Code to handle bb6
  }
});


9

Код:
    jQuery(".chx-color-bb-prompt").css({
        height: height - 3
    });
    jQuery(".chx-image-bb-prompt, .chx-link-bb-prompt").fadeOut(0);
    jQuery(".chx-color-bb-prompt").fadeIn(300);

10

Код:
document.querySelector(".chx-color-bb-prompt").style.height = height - 3 + 'px';
document.querySelectorAll(".chx-image-bb-prompt, .chx-link-bb-prompt").forEach(function(el){
el.style.display = 'none';
});
document.querySelector(".chx-color-bb-prompt").style.display = 'block';

Быстрый ответ

Напишите ваше сообщение и нажмите «Отправить»



Вы здесь » Шитпостинг » Обои для рабочего стола » Авиация