Use the jQuery's built in get method:
$('#myModal').on('hidden.bs.modal', function(){
$.get("/books", { id: 123 }, function(response) {
// You can do whatever you want with the response here, like...
$(".container").html(response);
});
// The response variable is async, so you wont be able to use it outside that scope
});
Then, in your back end, you will have a function that receives the request for that endpoint, something like:
function(request) {
var bookID = request.id;
// Fetch book data from your database
var bookData = YourModelMethod.getBook(bookID);
return "<div>" + bookData.title + "</div>";
}
You can find more details in jQuery documentation: https://api.jquery.com/jquery.get/