라이트 박스 이미지 뷰어를 사용하고 있는데 이미지 뷰어에 다운로드라고하는 버튼을 추가하고 싶습니다. 사용자가 클릭하면 외부 링크로 연결됩니다.클래스 링크로 이동
라이트 박스는 이미 href를 사용하므로 클래스를 추가했습니다.
난 그냥 thisiswheretogo
같이 location.href = 'thisiswheretogo'=
http://www.websitetogo.com 클래스
클래스를 =처럼 만들 필요가; 내 나쁜 설명
HTML 죄송
은
<a href="img/image viewer/the-infinity.png" rel="lightbox" class="http://www.websitetogo.com" >...</a>
자바 스크립트는
$lightbox.find('.download').on('click', function(e) {
location.href = 'class' ;
return false;
});
'에서는 window.location = $ ('클래스 이름.'). attr ('href'); ' –