Did you manage to find an answer. I am trying to do the same. The code posted on themesandco did not work for me.
Yes, I did, but I’m not able to access my notes on how I did it for another week. Check back here in a week (unless of course someone else knows, or can see how I did it on http://darioalfonsi.com ).
Thanks, I will wait until you can access your notes. Looks good on your site, thats what I need.
OK, I’m back now.
From what I can see, I edited class-fire-ressources.php
and changed the fancybox stuff to:
<script type="text/javascript">
jQuery(document).ready(function( $) {
// Fancybox
$("a.grouped_elements").fancybox({
'transitionIn' : 'elastic' ,
'transitionOut' : 'elastic' ,
'speedIn' : 200,
'speedOut' : 200,
'overlayShow' : true,
'hideOnOverlayClick' : true,
'autoScale' : <?php echo ($autoscale == 1) ? 'true' : 'false' ?>,
'changeFade' : 'fast',
'enableEscapeButton' : true,
'overlayOpacity' : '0.3',
'onStart' : function(currentArray,currentIndex){
var obj = currentArray[ currentIndex ];
this.title = $(obj).find('img').attr("alt");
},
'titleFromAlt' : true,
'titlePosition' : 'inside'
});
});
</script>
One thing I found is that if you use captions that are long, they won’t wrap in the black rounded boxes. You have to pull them inside the white frame to get them to wrap properly (hence the 'titlePosition' : 'inside'
line).
Two other changes you may note in there are:
'overlayShow' : true,
, 'hideOnOverlayClick' : true,
and 'overlayOpacity' : '0.3'
. These enable the background (‘overlay’), make it grey (0.3, on a scale of 0 to 1, if I recall correctly), and allow you to click on the background to close fancybox.
Let me know if this works for you.
Worked perfectly, thank you so much.