Possible Duplicate:
How to open fancybox using map link
I have found out how to use the links from imagemaps to display single images using Fancybox. I integrated into my site successfully. But, whatever I do, I cannot make it to display galleries.
I'm using the code below to display single images from an ImageMap.
<script type="text/javascript">
$(document).ready(function() {
/* Tek imaj */
$("a#fbox").fancybox({
'overlayShow' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'titlePosition' : 'inside'
});
});
</script>
<script type="text/javascript">
/* Image Map'den */
//<![CDATA[
$(window).load(function(){
$('map > area.fbox').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
var title = $(this).attr('title');
var type = $(this).attr('rel');
$.fancybox({
'title': title,
'titlePosition': 'inside',
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'href' : url,
'type' : type
});
});
});//]]>
</script>
These are the scripts, and this is the HTML.
<area shape="rect" coords="417,80,477,93" href="blabla.jpg" class="fbox" title="more blablabla" rel="image" />