I'm developing an Atom pro package, and I'm not able to find how to close modal.
The situation is as follows, I have a request outside the View class:
funtion set_note() {
$.ajax({
type: "POST",
url: "http://127.0.0.1:8000/api/notes",
data: {tags: $tags, note: $note, category: $category, title: $title, n:$n},
dataType: 'json',
success: function (data)
{
console.log(data);
if (data['status'] === true) {
$('#fake-form').find('#title').val('');
$('#fake-form').find('#tags').val('');
$('#fake-form').find('#note').val('');
//Gostaria de fechar a modal aqui
} else {
}
}
});
}
I've tried to pass 'this'
of view
and use the method destroy ()