我对这一切几乎一无所知,所以我向你寻求一些急需的帮助。如果您需要查看更多代码或信息,请询问,我会尽快回复。
以下代码片段是我用于照片库的内容:
http://luisposada.co.uk/home/photography-2/
问题是当您从左到右浏览缩略图时单击主图片下方的标题,但双击时仅从右到左显示。显然,无论单击缩略图的顺序如何,单击一下,我都希望更改字幕。
非常感谢你。
<script type="text/javascript">
$(function() {
$('#feature').cycle({
speed: 1000,
timeout: <?php echo $speed; ?>
});
$("#yc_thumbnail_frame a").live("click",function(){
$(".yc_img_fullsize").each(function(index) {
if ($(this).is(":visible")) {
var text = $(this).attr("alt");
$(".caption").html(text);
}
});
});
});
$(window).load(function() {
$("img.yc_img_fullsize").each(function(index) {
if ($(this).is(":visible")) {
var text = $(this).attr("alt");
$(this).parent().after("<p class='caption'>" + text + "</p>");
}
});
});
</script>