When bootstrap growl is placed at number 1 or number 2, it works fine.
When it is placed at number 3 ... I get the error:
Uncaught TypeError: $.bootstrapGrowl is not a function
<script>
// 1
$.bootstrapGrowl('Foo')
function addDeleteAnswerListener(button, div, id) {
// 2
$.bootstrapGrowl('Foo')
$('#' + button).click(function () {
$.ajax({
type: 'DELETE',
dataType: 'json',
url: window.location.origin + '/api/Answers/' + id + '?access_token=' + Cookies.get("authorization"),
success: function (res) {
$('#' + div).hide()
answerCount();
// 3
$.bootstrapGrowl('Foo')
},
error: function (res) {
window.alert(res.responseJSON.error.message)
}
})
})
}
</script>
How do I call the bootstrap-growl plugin from within the ajax call?