사고와 다음 하나 지금 시간 동안 노력하지만 캔트 내가의 jQuery fancybox - 대상 iframe이 특정 사업부의 #ID과 같은 #ID
작업 얻을은 내가 가지고하자에
2 선택기 말 페이지 1 개방 I 프레임을 클릭하고 다른 페이지에서 사업부가 볼에
<div>
<a class="more float_r" href="news.html"id=one>Lees Meer</a>
<a class="more float_r" href="news.html"id=two>Lees Meer</a>
</div>
이 지금까지
$(#one, #two").each(function(i, el) { $(el).fancybox({
'autoDimensions': true,
'type': 'iframe',
'iframe': { dataFilter: function(data) { return $(data).find('.news:eq(' + i + ')')[0]; } } });});
내 jQuery를하다
항상이 결과를 사용하여 iframe이 열리지 만 항상 첫 번째 div에는이 태그를 Ajax 호출과 함께 사용하지만 이제는 iframe에서 사용하려고합니다.
여기에 무엇이 누락 되었습니까?
...
'content':function(){
///here get content of your news.html in ajax call
///filter the response html code to extract your needed div
///return the div as html
},
'type':'ajax',
....
나는 그것을 테스트하지 않았습니다 :
위의 코드를 감안할 때 무엇이 발생했으면하고 싶습니까? 귀하의 질문이 충분히 명확하지 않습니다. – Shef
죄송합니다. id가 하나 인 것을 클릭하면 iframe에서 news.html 페이지의 클래스 뉴스와 첫 번째 div를 열고 싶습니다. id가 2 인 경우 두 번째 div를 클래스와 함께 열고 싶습니다. 뉴스 news.html iframe에서 newshtml – Jeroen