I am having a real simple/stupid problem and my lack of jQuery knowledge isn't helping.
In principle I have a galley with multiple pictures and want to use a sibling-<div>
-block with some HTML markup as title with FancyBox. Here's a bare-bones fiddle of my problem:
HTML:
<div class="someClass">
<a title="some title"
class="fancybox"
href="http://fancyapps.com/fancybox/demo/1_b.jpg">
<img src="http://fancyapps.com/fancybox/demo/1_s.jpg"
alt=""/>
</a>
</div>
<div class="captionClass">
this should be <br /> the <b>caption</b>
</div>
JavaScript:
$(".fancybox").fancybox({
'beforeLoad' : function() {
this.title = $(this).siblings('.captionClass').html();
}
});
Any help would be much appreciated :)
`-title in my research so far…
– Phil Strahl Aug 13 '14 at 21:54