I\'ve got a couple of hyperlinks that each have an ID attached. When I click on this link, I want to open a modal ( http://twitter.github.com/bootstrap/javascript.html#modal
I think you can make this work using jQuery's .on event handler.
Here's a fiddle you can test; just make sure to expand the HTML frame in the fiddle as much as possible so you can view the modal.
http://jsfiddle.net/Au9tc/605/
HTML
Link 1
test
Link 2
test
JAVASCRIPT
$(document).on("click", ".open-AddBookDialog", function () {
var myBookId = $(this).data('id');
$(".modal-body #bookId").val( myBookId );
// As pointed out in comments,
// it is unnecessary to have to manually call the modal.
// $('#addBookDialog').modal('show');
});