19 lines
1.0 KiB
JavaScript
19 lines
1.0 KiB
JavaScript
$(document).ready(function(){
|
||
$('.cancer_help_btn').append('<i aria-hidden="true" class="fa fa-question"></i>');
|
||
$('.cancer_help_btn').off("click").on('click',function(){
|
||
var modal_head = "";
|
||
try{ modal_head = $(this).parent().find(">label").html()}catch{};
|
||
var modal_body = "";
|
||
try{ modal_body = $(this).parent().find(">input.help_texts").attr('value')}catch{};
|
||
$('#show_help_modal').html("<div class='modal-dialog'><div class='modal-content'><div class='modal-header'><button type='button' aria-hidden='true' class='close'>×</button><h4 class='modal-title'>"+modal_head+"</h4>"+
|
||
"</div><div class='modal-body'>"+modal_body+"</div><div class='modal-footer'><button type='button' class='btn btn-default'>Close</button></div></div></div>")
|
||
$('#show_help_modal').modal('show');
|
||
$('#show_help_modal .close').off("click").on('click',function(){
|
||
$('#show_help_modal').modal('hide');
|
||
});
|
||
$('#show_help_modal .modal-footer button').off("click").on('click',function(){
|
||
$('#show_help_modal').modal('hide');
|
||
});
|
||
});
|
||
});
|