jQuery Show Notification Bar on Top of the Page with Example - cSharp Coder

Latest

cSharp Coder

Sharp Future

Wednesday, September 2, 2020

jQuery Show Notification Bar on Top of the Page with Example

 



<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jQuery Show Notification Bar At Top of Page</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script type="text/javascript">
$(function () {
$("#btnClose").click(function (evt) {
$("#notfiydiv").slideUp('slow');
});
$("#hrefshownotfify").click(function (evt) {
$("#notfiydiv").slideDown('slow');
});
});
</script>
<style type="text/css">
.notifybar
{
background-color#EB5E00;
colorwhite;
font-weightbold;
positionabsolute;
width100%;
top0px;
left0px;
text-aligncenter;
border-bottom-width2px;
border-bottom-color#666666;
border-bottom-stylesolid;
text-aligncenter;
padding10px;
}
</style>
</head>
<body>
<div id="notfiydiv" class="notifybar">
<label>jQuery Notification Bar on Top of the Page</label>
<br />
<input type="button" id="btnClose" value="Close" />
</div>
<div style="margin-left:50%">
<a href="" id="hrefshownotfify">Show Notification Bar</a>
</div>
</body>
</html>

No comments:

Post a Comment