伙计们,我已经实现了一个横幅画廊,如下所述:
<div class="Container">
<div class="Gallery">
<div class="GaleryLeftPanel">
<img id="img1" src="http://test-audioplanet.lumos.in.green.mysitehosted.com/Content/Public/images/1.png" style="z-index: 100" width="141"
height="140" alt="image 1" /></div>
<div class="GalleryMiddlePanel">
<img id="img2" src="http://test-audioplanet.lumos.in.green.mysitehosted.com/Content/Public/images/2.png" style="z-index: 99" width="141"
height="140" alt="image 2" /></div>
<div class="GaleryRightPanel">
<img id="img3" src="http://test-audioplanet.lumos.in.green.mysitehosted.com/Content/Public/images/3.png" style="z-index: 98" width="140"
height="140" alt="image 3" /></div>
</div>
</div>
$('img#img1').click(function () {
var currentScr = $(this).attr('src');
var second = $('img#img2').attr('src');
var third = $('img#img3').attr('src');
$('img#img3').attr('src', (second.indexOf("L") >= 0) ? second.replace('1L', '1').replace('2L', '2').replace('3L', '3') : second);
$('img#img2').attr('src', currentScr.replace('1', '1L').replace('2', '2L').replace('3', '3L'));
$('img#img1').attr('src', third);
});
$('img#img3').click(function () {
var third = $(this).attr('src');
var first = $('img#img1').attr('src');
var second = $('img#img2').attr('src');
$('img#img2').attr('src', third.replace('1', '1L').replace('2', '2L').replace('3', '3L'));
$('img#img3').attr('src', first);
$('img#img1').attr('src', (second.indexOf("L") >= 0) ? second.replace('1L', '1').replace('2L', '2').replace('3L', '3') : second);
});
您可以在以下小提琴中看到操作:
我需要的是,如果我单击第一个或第三个图像,我需要在第二个图像的顶部添加一个加载图像,直到它加载新图像。
请帮我..