freewall 및 featherlight 플러그인을 사용하여 라이트 박스로 열리는 반응 형 갤러리를 만들었지 만 라이트 박스에서 다음 이미지로 전환하려고 할 때 다음과 같은 문제가 있습니다. (i + 1)을 클릭하면됩니다. 라이트 박스 이미지 코드 enter image description here. 내가하고 싶은 일은 img src를 i + 1로 변경하여 클릭시 다음 이미지로 이동하는 것입니다. 수동으로 이미지를 클릭에 다음의 요소를 트리거해야 https://github.com/adamianniello/adamianniello.com/blob/master/B%C3%A6b%C3%A6l%C9%99n_Pasadena.htmlLightbox Jquery on click 다음 이미지
\t \t <script type="text/javascript">
\t \t \t var temp = "<div class='brick' style='width:{width}px;'><a href='#' data-featherlight='i/jpl/{link}.jpg'><img src='i/jpl/{index}.jpg' width='100%'></a></div>";
\t \t \t var w = 1, h = 1, html = '', limitItem = 54;
\t \t \t for (var i = 0; i < limitItem; ++i) {
\t \t \t \t w = 1 + 3 * Math.random() << 0;
\t \t \t \t html += temp.replace(/\{width\}/g, w*150).replace("{index}", i + 1).replace("{link}",i + 1);
\t \t \t }
\t \t \t $("#freewall").html(html);
\t \t \t var wall = new Freewall("#freewall");
\t \t \t wall.reset({
\t \t \t \t selector: '.brick',
\t \t \t \t animate: true,
\t \t \t \t cellW: 150,
\t \t \t \t cellH: 'auto',
\t \t \t \t onResize: function() {
\t \t \t \t \t wall.fitWidth();
\t \t \t \t }
\t \t \t });
\t \t \t var images = wall.container.find('.brick');
\t \t \t images.find('img').load(function() {
\t \t \t \t wall.fitWidth();
\t \t \t });
<div id="freewall" class="free-wall"></div>
'featherlight-gallery' 플러그인을 사용하고 있습니까? 그것은 당신이 필요로하는 것처럼 보입니다. –
나는 featherlight-gallery를 사용해 보았지만, Freewall 플러그인을 사용하여 그리드를 보여주고 있는데, Freewall 플러그인을 깨지 않고 featherlight-gallery를 사용하는 방법이 있습니까? –
나는 왜 안 보이지. –