我想创建弹出窗口。 但我有一些问题:
弹出窗口应该在点击它之后消失。但在我的解决方案弹出消失,当我点击里面。 这里是我的代码创建弹出窗口
<div class="popup__show">Click Me</div>
<div class="popup__container">
<div class="popup">
hellohellohellohellohellohellohellohellohellohellohellohello
</div>
</div>
jQuery的
$(document).ready(function() {
$('.popup__show').click(function() {
$('.popup__container').show();
});
$('.popup__container').click(function() {
$('.popup__container').hide();
});
});
https://jsfiddle.net/fw1d59Lz/ - 小提琴 谢谢您的回答和索里,我的英语。
你可以使用自动关闭的引导程序,当你点击外部弹出窗口时没有任何附加代码 – DevelopmentIsMyPassion
谢谢,但我需要解决方案,无需自举) – Hlushenok
呃...没有任何额外的代码,除了Bootstrap。 :) – SimianAngel