I'm following a tutorial using Bootstrap 3. So far so good, except for a non-expected behavior: when I click a button associated with a jQuery function, the alert gets displayed fine. However, once I dismiss it, clicking the button again doesn't do anything, that is, looks like it's a no-op.
For brevity, I'll include the relevant sections. I have the following <div>:
<div class="row" id="bigCallout">
<div class="col-12">
<div class="alert alert-success alert-block fade in" id="successAlert">
<button type="button" class="close" data-dismiss="alert">×</button>
<h4>Success!</h4>
<p>You just made this element display using jQuery.</p>
</div>
</div>
</div> <!-- end bigCallout -->
Below I include my JS file:
<!-- Custom JS -->
<script src="includes/js/script.js"></script>
The JS file mentioned above contains this only function:
$(function() {
$('#alertMe').click(function(e) {
e.preventDefault();
$('#successAlert').slideDown();
});
});
Why is the function being executed only the first time the button is clicked? Thanks!