I have this panel on my .aspx webform page to display messages (success, failed, exception etc.) after button postback events . I also included some Jquery library on this page as well.
<asp:Panel ID="InfoPanel" runat="server" class="alert alert-success alert-dismissable" Visible="False">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button>
<i class="fa-lg fa fa-bullhorn"></i>
<asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>
</asp:Panel>
It will look like this: (lblMessage will display the text at code-behind)
How do I make it to be auto-close after 5s, I have zero knowledge about JS and jQuery but if you show me how it work I can apply it to my program (lol) Note: I see this question right here: Bootstrap Alert Auto Close the selected answer was:
$("#success-alert").fadeTo(2000, 500).slideUp(500, function(){
$("#success-alert").alert('close');
});
But I am confused, how do I make it work?