當用戶點擊選項時,fancybox會彈出所有選項。當用戶點擊任何列出的選項時,與該選項相關的內容將出現在相同的彈出窗口中,但fancybox彈出窗口永遠不會拉伸(自動調整圍繞新的div高度和寬度)content.Plz幫助當內容改變時,自動調整FancyBox彈出的高度?
<div class="modelbox" id="#options">Options</div> //when user clicks here a fance box appeares with few options,say three.
<div style="display:none" id="options">
<p onclick="$("#option1div").show()" >option 1</p> //when user clicks anyone one of these option.then the belov div opens on the fancy form. **problem is that.div opens but with the scrollbars and hight of the fancebox pop up form neve adjusted acorting to the new div content. help plz**
<p onclick="$("#option2div").show()">option 2</p>
<p onclick="$("#option3div").show()">option 3</p>
<div>
<div style="display:none" id="option1div"> large data here</div>
<div style="display:none" id="option2div"> large data here</div>
<div style="display:none" id="option3div"> large data here</div>
非常感謝你。解決了pro blem.but一個問題更多。如果一旦fancybox被點擊,ns選項din被打開。在關閉這個div之後,重新點擊fancybox,之前打開的div顯示只顯示三個選項。如果我刷新頁面, fine.Plz help –
@AanaSaeed:你可以使用回調'afterClose'來再次隱藏'div' ....參見** http://jsfiddle.net/d6TqE/3/** – JFK