data-toggle with jquery code example
Example: how to add data-toggle and data-target using jquery
$("button").on("click", function(){
$($(this).attr("data-target")).modal("show");
});
$("button").on("click", function(){
$($(this).attr("data-target")).modal("show");
});