단추가있는 모달 인라인을 만드는 경우 ... 각을 클릭 할 때 특정 동작을 수행 할 수 있기를 원합니다. 그러나, 나는 모달에 생성 된이 버튼을 잡을 수 없습니다.Magnific popup - 모달 내에서 버튼을 참조하는 방법?
내가 어떻게 잡을 수 있는지 아는 사람 있습니까?
$('.open-popup-link').magnificPopup({
items: {
type: 'inline',
src: $('<div class="white-popup">\
<h4>Are you sure you were discharged for failing a drugs test?</h4>\
<p>You will not be able to change your answer once you have submitted these details.</p>\
<button id="test-popup-no">No, I\'ve made a mistake</button>\
<button id="test-popup-yes">Yes, I\'m sure</button>\
</div>')
},
type: 'inline',
midClick: true
});
해당 ID에 따라 각 버튼을 클릭 할 때 다른 동작을 수행하고 싶습니다.
가능한 경우 도움을 받으십시오. 나는 이것으로 고투하고있다. 표준 jQuery를 선택하는 것만으로는 효과가없는 것 같습니다.
고마워, 마이클.
감사합니다. 훌륭한! –