Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

254
Visualizações
JQuery mouseup outside window – possible?

I am trying to accomplish a rudimentary drag. On mousedown the item starts dragging, but not at the same speed as the mouse, so i continue dragging when the mouse is outside the window, but if the mouse is not over the page i can't get mouseup events.

I can see other pages do this so i know it is possible. Appreciate any help.

Edit: eg

Play any video on Vimeo http://vimeo.com/19831216 make sure the window is small enough on your screen with space above it, then drag the video's progress bar left and right, now move the cursor outside the top edge of the window while still dragging left/right - see? Now release mouse button while still outside of the window - dragging ends and video continues playing.

Note: Vimeo has an option to use a flash player or HTML5 player and this is with the html5 player.

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

You actually can get the mouseup outside of the browser's window.

It worked for me at least.

$(function(){
    $(window).mouseup(function(){
       alert('mouse up'); 
    });
});

http://jsfiddle.net/fFeJ6/

Working on Chrome 10 on Ubuntu Maverick.

over 4 years ago · Santiago Trujillo Relatório

0

you can not track mouse events outside the browser window with javascript.

as explained here you can only check if the mouse leaves the window.

over 4 years ago · Santiago Trujillo Relatório

0

You can maybe catch the mouseout event and then call your mouseup function from there:

$(window).mouseout(function() { $(item).mouseup(); });
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda