I have an adjunct dialog for my page that I invoke when I need to let the user add additional (more than three) email addresses:
- <button class="btn" name="btnAddlEmail" id="btnAddlEmail">Add Another Email</button>
. . .
@* modal input form which remains invisible until the link (addlEmails) is clicked *@
<div class="modal fade halfwidth" id="add-email">
<div class="modal-header">
<a class="close" data-dismiss="modal"></a>
<h3></h3>
</div>
<div class="modal-body">
<p></p>
<label class="margin4horizontal"></label>
<input type="text" name="additionalEmail" id="additionalEmail" />
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal"></a>
<a href="#" class="btn btn-primary" id="btnSaveEmailInternal"></a>
</div>
</div>
...and this code that should handle the button on the dialog being clicked:
$("#btnSaveEmailInternal").click(function() {
if ($('#additionalEmail').val().length >= MINIMUM_EMAIL_LENGTH) {
_recipients.push($('#additionalEmail').val());
}
});
...but my breakpoint within it is never reached. Why not, and how can I fix this?