Re: Performing Double Click and Drag & Drop using Javascript

Friday, November 2, 2012

Have you tried setting a setTimeout() that when the user interacts with the element, you call element.trigger('click') twice?

On Sat, Nov 3, 2012 at 12:58 AM, SACHIN V <> wrote:

   Hi Nathan & Cyberoot,

          I have a webpage where If I double click on an element it performs some action, but onDbClick() is not directly implemented on it. I'm trying to automate that part, where I can perform the double click using JavaScript so that corresponding action is triggered as it would happen if a user double clicks on it.

It would be great if you can help me on this?

I tried using initEvents(), but it is giving me the desired results.

V Sachin

On Friday, November 2, 2012 9:46:37 AM UTC+5:30, cyberoot wrote:
Like this??
Source Code
<html lang="en">
 <title>Drag Cyberoot Test</title>
<script src="" type="text/javascript"></script>
<script src="" type="text/javascript"></script>
<script src="" type="text/javascript"></script>
<script src="" type="text/javascript"></script>
 #cyberdrag { border:1px solid green;width: 170px; height: 100px;padding:10px; border-radius:10px;}
 $(function() {
  $( "#cyberdrag" ).draggable();
<body bgcolor="black">
<div id="cyberdrag">
<span style="color: orange;">
 ကၽြန္ေတာ္ကိုဆြဲပါ <span style="color: red;">^_^</span><br />

On Fri, Nov 2, 2012 at 7:26 AM, Nathan Mynarcik <> wrote:
So you want to trigger a double click without the user doing anything? Or demonstrate a double click to the user (i.e. custom cursor that looks like it is clicking down twice)?

I'm kinda confused on what exactly you are trying to achieve.

On Sat, Oct 27, 2012 at 9:50 AM, SACHIN V <> wrote:

Hi All,

I want to simulate performing double click and Drag & Drop using JavaScript.I don't want to call ondbClick(), as it is usually called when a user performs a double click. Here I want to perform the double click itself.
Can anyone tell me how can I achieve this?






Post a Comment

Note: Only a member of this blog may post a comment.

Copyright © 2010 Web Design | Free Blogger Templates by Splashy Templates | Layout by Atomic Website Templates

Vida de bombeiro Recipes Informatica Humor Jokes Mensagens Curiosity Saude Video Games Animals Diario das Mensagens Eletronica Rei Jesus News Noticias da TV Artesanato Esportes Noticias Atuais Games Pets Career Religion Recreation Business Education Autos Academics Style Television Programming Motosport Humor News The Games Home Downs World News Internet Design Entertaimment Celebrities 1001 Games Doctor Pets Net Downs World Enter Jesus Mensagensr Android Rub Letras Dialogue cosmetics Genexus lasofia thebushrajr wingshock tripedes gorduravegetal dainfamia dejavu-transpersonal jsbenfica republicadasbadanas ruiherbon iranianforaryans eaystcheyl fotosdanadir Só Humor Curiosity Gifs Medical Female American Health Madeira Designer PPS Divertidas Estate Travel Estate Writing Computer Matilde Ocultos Matilde futebolcomnoticias girassol lettheworldturn topdigitalnet Bem amado enjohnny produceideas foodasticos cronicasdoimaginario downloadsdegraca compactandoletras newcuriosidades blogdoarmario arrozinhoii