Commit 22445108 authored by dj3c1t's avatar dj3c1t

init_bb_confirm

parent dd1246df
$(document).ready(
function() {
$(".bb_confirm").click(
function () {
var a = $(this);
bootbox.confirm(
$(this).attr("data-message"),
function(result) {
if(result) {
document.location.href = a.attr("href");
}
}
)
return false;
$(".bb_confirm").each(
function() {
init_bb_confirm($(this));
}
);
}
);
function init_bb_confirm(elt) {
elt.click(
function () {
bootbox.confirm(
elt.attr("data-message"),
function(result) {
if(result) {
document.location.href = elt.attr("href");
}
}
)
return false;
}
);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment