How can show closeable in the top of the page like stackoverflow new answers. im using asp.net
+2
A:
Do you mean the notification bar? If so, there is a nice demo and code snippet here.
http://tympanus.net/codrops/2009/10/29/jbar-a-jquery-notification-plugin/
Barry
2010-05-27 08:34:04
@Barry Thanks for this one! This would help.
dkris
2010-05-27 08:37:10
It makes me sad that there's a plug-in for something that's LITERALLY 2 lines of code. 3 if you want it to remove itself after X time.
Erik
2010-05-27 08:57:49
+1
A:
Here are a few jQuery imlpementations of the effect you looking for:
You will have to build on these.
dkris
2010-05-27 08:35:35
+2
A:
It's really pretty simple - there's a div, with a control in it (an anchor I imagine) with a click event bound to it which removes the parent item from the DOM. Something like this
<!-- html -->
<div id="warning"><a href="#" class='close'>[X]</a></div>
And then some event goodness:
$(document).ready(function() {
$('.close').bind('click', function(e) {
$(this).parent.remove();
});
});
and you're pretty much done. Add salt and CSS to taste.
Erik
2010-05-27 08:38:29