2
I have an object created inside a container-Fluid div. I create the object Bootbox without any problem to generate a modal confirm (code below).
$("div.container-fluid").on("click", "button#geraModal", function() {
bootbox.confirm({
title: "What is your real name?",
message: "<div class="row"> <div class="col-md-3>" +
"<div id="exemplo"> Quero acessar essa DIV </div>" +
"</div> </div>",
callback: function(result) {
if (result === false) {
alert("Confirm Cancel");
} else {
alert("Hi <b>"+result+"</b>");
}
}
});
});
When I try to access some modal object via jQuery it does not work.
I can’t access any modal element via jQuery. If I want to run a function. It only works if I put a Javascript inside the div
with an event onclick
(for example).
I’m trying to access div
of the above example as follows:
$("div.container-fluid").on("click", "div#exemplo", function() {
// Faça algo
alert("Não passa aqui");
});
Are you sure that the plugin creates the modal structure within
div.container-fluid
?– DontVoteMeDown
I’ve tried accessing directly. It doesn’t work.
– Bruno Nascimento