With the selector $('div.alert') I get the following:
<div class="alert alert-success alert-dismissible fade show" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
Foo Bar is now locked
</div>
I want to return the text Foo Bar is now locked. But using $('div.alert').text() all I get is ...text() is not a function. How to retrieve the text?