Just got my example to work and here it is,
function topBar(message) {
var $alert = $('<div/>');
$alert.text(message);
$alert.click(function() {
$(this).slideUp(200);
});
$(body).append($alert);
setTimeout(function() { $alert.slideUp(200) }, 5000);
}
and css:
#alert
{
overflow: hidden;
width: 100%;
text-align: center;
position: absolute;
top: 0;
left: 0;
background-color: #FF0000;
height: 0;
color: #FFFFFF;
font: 20px/40px arial, sans-serif;
opacity: .9;
}
Try it and let me know for doubts...
hi how can i call this function in button click code behind. asp.net c#
ReplyDelete