2017-04-05 17 views
0

https://github.com/noelboss/featherlight/ featherlight.js 및 featherlight.gallery.js를 사용하여 갤러리에 사용자 정의 HTML을 표시 할 수 있습니까? 예를 들어, 의견을 달 수있는 양식이있는 사진.featherlight.gallery.js를 사용하여 사진뿐만 아니라 일부 HTML 컨텐트를 모달로 표시하는 방법

나는 같은 방법으로 시도 :

<a class="gallery" href="some.html"> 
    Some text 
</a> 
<a class="gallery" href="another.html"> 
    Some another text 
</a> 

$('a.gallery').featherlightGallery(); 

그리고 난 다음 슬라이드 버튼을 클릭 할 때 다음 이미지와 양식을 보여 주지만,이 JS 오류 반환 :

Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. 
at getStyles (jquery-latest.js:6118) 
at curCSS (jquery-latest.js:6125) 
at Function.css (jquery-latest.js:6718) 
at Text.isHidden (jquery-latest.js:4098) 
at jquery-latest.js:2647 
at Function.grep (jquery-latest.js:482) 
at winnow (jquery-latest.js:2645) 
at jQuery.fn.init.filter (jquery-latest.js:2713) 
at jQuery.fn.init.fadeTo (jquery-latest.js:7451) 
at Array.<anonymous> (featherlight.gallery.min.js:7) 

두 번째로 클릭하면 오류 만 반환되고 아무 것도 표시되지 않습니다.

그래서 가능합니까? 또는이 솔루션에 대한 또 다른 js 갤러리를 알려주시겠습니까?

고맙습니다.

답변

0

하실 수 있습니다. this page에서 두 번째 갤러리 (두 번째 행)에는 HTML 만있는 슬라이드가 있습니다.