我想在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. 没有链接的Lightbox库
- 2. Javascript链接到LIGHTBOX图像
- 3. 从链接中删除lightbox行为
- 4. php lightbox lightbox引起错误
- 5. 动态链接和jQuery Lightbox问题:在Lightbox中加载图片...完全难住!
- 6. jQuery toggle div与链接到colorbox(lightbox)
- 7. multibox lightbox
- 8. lightbox + imageflow
- 9. Bootstrap LightBox
- 10. jQuery Lightbox Evolution:在iframe外部加载lightbox
- 11. Lightbox内的Facebook?
- 12. Lightbox Squashed Images
- 13. Facebook Like html lightbox
- 14. jQuery Lightbox onComplete?
- 15. Get Facebook Photo lightbox
- 16. Lightbox Var问题
- 17. jQuery qTip和lightbox
- 18. jquery lightbox,popup
- 19. Primefaces lightBox问题
- 20. HTML5 PushState lightbox
- 21. Javascript和Lightbox
- 22. jQuery lightbox图库
- 23. Contentflow和Lightbox 2
- 24. Mootools Lightbox Img Slider
- 25. Bootstrap Gallery with Lightbox
- 26. jquery lightbox iframe
- 27. eventClick与lightBox?
- 28. Apple's Gallery Overlay Lightbox
- 29. jQuery LightBox Grid PlugIns
- 30. Lightbox iframe关闭