Yes Yes - 3 months ago 46
AngularJS Question

Bootstrap alert shows up only once in JSFiddle

When I click the save button on the first time, the alert shows up fine. But every time after that, the alert doesn't show up unless I do a hard refresh.

Here is the JSFiddle: JSFiddle

$("#saveChange").click(function showAlert() {
$("#success-alert").fadeTo(2000, 500).slideUp(500, function() {

<script src=""></script>
<link href="" rel="stylesheet"/>
<script src=""></script>

<div class="product-options">
<button id="saveChange" href="javascript:;" class="btn btn-mini">Save</button>
<div class="alert alert-success" id="success-alert">
<button type="button" class="close" data-dismiss="alert">x</button>
<strong>Success! </strong>
Your changes has saved.


the line


destroys your alert so you cannot open it again.
remove that line and your alert will show each time