Adding jquery lightbox to a mapped image

0

I have an image that I am mapping and I want to put a link in some points, but by clicking on these points I want to open a window using some jquery plugin (lightbox type), to give a better effect, see the code that I am using:

<img class="zoomImg" src="images/crateria.png" style="position: absolute; top: -436.066px; left: -511.866px; opacity: 0; width: 2000px; height: 1494px; border: medium none; max-width: none; max-height: none;" usemap="#crateria-map">
<map name="crateria-map">
<area class="html5lightbox" href="https://www.youtube.com/watch?v=FXL2v657IZ4" shape="rect" coords="716,382,755,406" alt="map crateria">
</map>

Since the lightbox I'm using works only if an IMG tag is inside an A tag.

Help!

    
asked by anonymous 23.03.2015 / 15:15

1 answer

0

I found the answer on the site where I downloaded the plugin: link

In the part where you have recently asked questions, you have a question about how to activate the effect using javascript, below the codes to open image, youtube video and vimeo video:


FOR IMAGE:

function activarlightbox () { html5Lightbox.showLightbox (0, 'images / Toronto_1024.jpg', 'Image lightbox'); }


VIDEO OF YOUTUBE:

function activarlightbox () { html5Lightbox.showLightbox (3, 'http://www.youtube.com/embed/YE7VzlLtp-4', 'YouTube lightbox');


VIDEO OF VIMEO:

    jQuery ("document"). ready (function () {         html5Lightbox.showLightbox (4, 'http://player.vimeo.com/video/1084537', 'Big Buck Bunny');     });


The vimeo code came from another question that has just below the answer to activate the effect for image and for the video of youtube, I used the code using a function, then I put in the html the "onclick" to activate the effect, but depending on what you have done may be the "onmouseover", for example ...

^ _ ^

    
21.04.2015 / 23:23