我想在LightBoxes上顯示HTML表單。每個燈箱都會有一個按鈕。 onClick按鈕,一個新的LightBox應該打開一個新的HTML表單。我如何做這樣的導航。我發現圖像之間的導航,但不是HTML表單。鏈接LightBox中的LightBox
0
A
回答
3
您不需要打開新的燈箱,而是將新窗體的內容加載到當前窗體中。另外,不要從按鈕中捕獲點擊事件,因爲如果用戶嘗試按鍵盤上的輸入提交表單,它就不會起作用。你可以做這樣的事情:
$('#lightbox form').submit(function(){
// some validation logic can be here
// load the form from another file
$('#lightbox').load('step-two-form.html');
// OR insert it from the same document
$('#lightbox').html($('#step-two-form'));
// and return false for avoid reload the page
return false;
});
0
可以讓兩個獨立的div在同一收藏夾內容
<div class="lightbox">
<div id="firstdiv">CONTENT 1 that contains a button to show #seconddiv and hide #firstdiv</div>
<div id="seconddiv" class="hidden">CONTENT 2</div>
</div>
我已經在這裏類似
http://www.klein-associes.com/grand_public/#
點擊「ACCES法新社/ DISTRIBUTEUR」的東西然後「s'inscrire」進行演示
$('#firstdiv #button1').click(function(){
$('#firstdiv').fadeOut('fast',function(){
$('#seconddiv').fadeIn('fast');
});
});
相關問題
- 1. 動態鏈接和jQuery Lightbox問題:在Lightbox中加載圖片...完全難住!
- 2. jQuery toggle div與鏈接到colorbox(lightbox)
- 3. multibox lightbox
- 4. lightbox + imageflow
- 5. eventClick與lightBox?
- 6. Bootstrap Gallery with Lightbox
- 7. jQuery LightBox Grid PlugIns
- 8. jQuery qTip和lightbox
- 9. jQuery lightbox圖庫
- 10. jquery lightbox,popup
- 11. Javascript和Lightbox
- 12. Apple's Gallery Overlay Lightbox
- 13. Get Facebook Photo lightbox
- 14. Lightbox iframe關閉
- 15. Lightbox Var問題
- 16. Galleriffic with lightBox
- 17. jQuery Lightbox onComplete?
- 18. Primefaces lightBox問題
- 19. 將rel =「lightbox」添加到帶有.jpg和.gif的鏈接中
- 20. jquery lightbox的問題
- 21. jCarousel連接到wordpress的lightbox插件?
- 22. 彈出Lightbox燈箱
- 23. jquery lightbox網站庫
- 24. css lightbox-slider關閉
- 25. EasySlider和Lightbox衝突?
- 26. Wordpress Lightbox Gallery by post
- 27. Featherlight Lightbox JS問題
- 28. jQuery FancyBox/Lightbox問題
- 29. 問題與LightBox jquery
- 30. UIKIT Lightbox Javascript關閉