0
를 열고, 나는 설명서는 다음 코드수동으로 문서를 읽은 후 nyroModal 갤러리
$.nmManual(this.href);
과 URL (이미지)을 열고 호출을 관리하지만 지금은 nyroModal에 수동으로 전화를 할 싶습니다 지금까지 행운없이 갤러리 필터. 필터 gallery
을 .nmManual()
콜백에 넣으려고했으나 아무 것도하지 않습니다.
를 열고, 나는 설명서는 다음 코드수동으로 문서를 읽은 후 nyroModal 갤러리
$.nmManual(this.href);
과 URL (이미지)을 열고 호출을 관리하지만 지금은 nyroModal에 수동으로 전화를 할 싶습니다 지금까지 행운없이 갤러리 필터. 필터 gallery
을 .nmManual()
콜백에 넣으려고했으나 아무 것도하지 않습니다.
나는 수동 호출이 필요 처리 난이 해결 방법을 사용 :이 당신을 도울 수 있기를 바랍니다
<div style="display:none;">
<?php $i=0; ?>
<?php foreach ($Gallery as $item): ?>
<?php if ($item->hasPhoto()): ?>
<a id="photo<?php echo $i ?>" href="<?php echo $item->getRelativePhotoPath() ?>" class="photo_gallery" title="<?php echo $item->getCaption() ?>" rel="gal"></a>
<?php $i++; ?>
<?php endif; ?>
<?php endforeach; ?>
</div>
$(document).ready(function() {
// #photo_gallery is the css selector of the anchor link used to start the gallery
if ($('#photo_gallery').length != 0 && $('.photo_gallery').length != 0)
{
$('.photo_gallery').nyroModal();
$('#photo_gallery').click(function(e) {
e.preventDefault();
$('#photo0').click();
});
}
});
합니다.
감사합니다.하지만 live() 이벤트에서 nyroModal 플러그인을 사용하고 싶기 때문에 수동 호출을 사용하고 있습니다. 불행히도'.nyroModal()'호출은 DOM 귀하의 예와 같이 준비가되었습니다. – Nicolas
'.nyroModal()'은 이벤트 핸들러를 첨부하고 갤러리는'$ ('# photo0'). click()'을 시작합니다. 여기서 # photo0은 첫 번째 이미지입니다. 물론 나는 당신의 코드를 모른다. 단지'live()'를 사용하여 이런 유형의 행위를 수행 할 수 있는지 스스로에게 묻는다. – macgyver