javascript - prevent dbl click not working on pop up z-layer -


I have a layer, when the user clicks on a link, there is another link inside this z-layer which The video loads, something strange, when they double click on the link if they right click, they only click once. I know that this is not the best solution to fix this problem, but I have to do this work, till I find out what the real problem is.

I tried putting a link in the home page and it works fine. Any help is welcome.

JS

  $ (document) .ready (function () {$ ('. Answer_link'). Bind ('Dblclick', Function (e) {alert (); // e.preventDefault ();})});   

HTML

  & lt ;? Php echo & lt; Div class = "answer_recorded_container" & gt; & Lt; a class = "answer_link" href = "javascript: getvideo (\ '. $ d-> video.' \ ', \' '. $ owner.' \ ');" & Gt; & Lt; Div & gt; '. $ D & gt; Question '. & Lt; Br> & Lt; Br> & Lt; / Div & gt; & Lt; / A & gt; & Lt; / Div & gt; ';    

If you want to completely stop the "dbclick" event, The timing can only return false turns.

  $ ('. Answer_link'). Bind ('dblclick', function (e) {//e.preventDefault (); return false; console.log ('asjdhfkjasfhjasd');});   

Tip: Try reps or methods instead of binding elements.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -