I am using fancy box 2 in a wordpress site made from a child theme of twenty twelve. I want it so that when you hover over the image it will say the persons name and when you click on the image it will have a couple of paragraphs description. I have everything working except for the hover part, when you hover it shows the whole big description.
Here is a link to the page. (the password is boogiebop)
Here is the JavaScript:
jQuery(document).ready(function() {
jQuery(".fancybox").fancybox({
beforeshow: function(){
this.title = $(this.element).next('.newTitle').html();
},
helpers: {
title : {
type : 'inside'
}
}
}); // fancybox
}); // ready
I have tried adding this:
<a class="fancybox" href="images/01.jpg" title="only show this on hover"><img src="images/01t.jpg" /></a>
<div class="newTitle" style="display: none;"><p>hello, visite my site <a href="http://fancyapps.com/fancybox/">http://fancyapps.com/fancybox/</a></p></div>
But to no avail all I get is the standard title.