jquery - Loading lightbox with double click -


is possible set lightbox shows expanded picture when double clicked/tapped rather single click/tap?

update:

i using code below disable click command on links , make them react double click instead:

        $('a', this).each(function () {           $(this).click(function () {             return false;           }).dblclick(function () {                             window.location = this.href;             return false;           });         }); 

however, getting page load picture instead of lightbox functionality loads picture overlay. how can call lightbox functionality javascript/jquery function?

jquery offers dblclick event handler

http://api.jquery.com/dblclick/

javascript offers ondblclick listener

http://reference.sitepoint.com/html/event-attributes/ondblclick

update:

i see, lokesh's lighbox (i'm assuming 1 using, since there several) intrinsically connected single click event, can see on lines 49-55.

github.com/lokesh/lightbox2/blob/master/js/lightbox.js

the approach trying sort half of problem cancel single click activation. 'dblclick' part doing want to, is, opening image on window itself.

there no code anywhere triggering lightbox on event.

there 3 things do: (i) modify lighbox, changing event on line 51 should work. (ii) use different plugin, 1 accepts options. (iii) create view controller initialises lb params , simulates click trigger it.

solution (i) has caveat prevents updating new versions come without modifying code since change trivial, may not problem. solution (iii) ugly , don't recommend it's there completeness' sake.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -