2
BackboneJS (0.9.2) 및 RequireJS (2.1.3)가 있고 인라인 숨겨진 컨텐트 (밑줄 템플릿에서 렌더링 됨)를 여는 데 Fancybox를 사용해야하는 상황이 있습니다. :Fancybox2.1.3이 백본 및 IE7에서 작동하지 않습니다.
<div id="inlineContent" style="display: none">
<div class="brand-images">
<img class="brand-image" src="/img/brandImage.png" alt="" />
<img class="designer-image" src="/img/designer.jpg" alt="" />
<div class="external button"><a href="<%= designer.get("link") %>" data-designer="<%= designerId.substr(2, designerId.length) %>">Shop the full collection</a><span></span></div>
</div>
<div class="details">
<p><%= designer.get("bio") %></p>
<p class="more-bio"><%= designer.get("bioMore") %></p>
</div>
</div>
나는 요소에 fancybox를 부착하기 위해 다양한 방법을 시도했습니다, View.render (도 사용 View.events)에있는 가장 간단한 : IE7하지만 모두
$(this.el).html( _.template(detailsDesignerTemplate, data)).appendTo(that.pageElement);
$('.read-more').fancybox({
padding: 0,
height: 'auto',
width: 970,
autoSize: false,
title: '<h1>Title</h1>'
});
(NO IE6 지원, 예!) 작동합니다. IE7은 아무 것도하지 않습니다 (흥미롭게도 "beforeLoad"콜백을 호출합니다).
흥미롭게도 iFramed 콘텐츠와 함께 작동합니다.
개발자 도구 콘솔에서 오류 메시지가 있는지 확인 했습니까? – Janis
'DOCTYPE'은 무엇입니까? – JFK