My div is inside a user control, it shows a "successful" message after a gridview update. I don't want that div to be persistent and want to hide it after a few seconds without refreshing the page. Here is my code:
<div id="MsgInfo" runat="server" class="divMsg" visible="false" /></div>
In my usercontrol I added the link to the script file:
<script type="text/javascript" src="../HideMsg.js"></script>
The script:
$(function () {
setTimeout(function () {
$("#MsgInfo").fadeOut(1500);
},
5000);
});
I don't know what is missing there but the message can't fade out or disappear.
I went through a lot of similar question and solution but still can't hide the div with Jquery.