我在一个由 22 岁儿童主题制成的 wordpress 网站中使用了精美的盒子 2。我想要它,这样当您将鼠标悬停在图像上时,它会显示人名,当您单击图像时,它将有几段描述。除了悬停部分,我什么都可以工作,当你悬停时,它会显示整个大描述。
这是该页面的链接。(密码是boogiebop)
这是JavaScript:
jQuery(document).ready(function() {
jQuery(".fancybox").fancybox({
beforeshow: function(){
this.title = $(this.element).next('.newTitle').html();
},
helpers: {
title : {
type : 'inside'
}
}
}); // fancybox
}); // ready
我试过添加这个:
<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>
但无济于事,我得到的只是标准标题。