I can include one popup into my site, but when I want to add second this don't work properly.
I'm looking for two buttons with individual popup for each,.
check Jsfiddle and here plugin offical site
What's wrong with this?
JQUERY
(function ($) {
$(function () {
$('#my-button,#my-button2').bind('click', function (e) {
e.preventDefault();
$('#element_to_pop_up,#element_to_pop_up2').bPopup();
});
});
})(jQuery);
CSS
#element_to_pop_up {
background-color:#fff;
border-radius:15px;
color:#000;
display:none;
padding:20px;
min-width:400px;
min-height: 180px;
}
.b-close {
cursor:pointer;
position:absolute;
right:10px;
top:5px;
};
#element_to_pop_up2 {
background-color: black;
border-radius:15px;
color:#000;
display:none;
padding:20px;
min-width:400px;
min-height: 180px;
}
HTML
<button id="my-button">POP IT UP</button>
<div id="element_to_pop_up"> <a class="b-close">x<a/>
Content of popup
</div>
<button id="my-button">POP IT UP</button>
<div id="element_to_pop_up2"> <a class="b-close">x<a/>
Content of popup
</div>