【发布时间】:2011-07-13 21:21:16
【问题描述】:
我是 JQuery 的新手,刚开始玩它,我有一个效果很好的图像选择器,但是我正试图将它变成幻灯片,所以它每隔几秒钟就会交换图像和文本,但是我仍然想将点击功能保留在单独的元素上。
谁能帮忙?:
$ ( function () {
$ ("a:has(img.gallery)").click(function() {
var largePath = $ (this) .attr ("href");
var caption = $ (this) . attr ("title");
var image = $ ("#large-image");
image.fadeOut('400', function () {
image.attr ({ src: largePath }) ;
image.fadeIn('400');
});
$ ("#caption1"). text (caption) ;
return false;
}) ;
});
</script>
我们将不胜感激任何和所有的帮助
谢谢
【问题讨论】:
标签: jquery image slideshow slidetoggle