javascript - Stacking notification bars -
i notification bars used in stackoverflow. have found jquery plugin makes notification bar possible few lines, plugin not seem stack multiple notifications bars when required.
does know of better plugin or how plugin below stack bars more notifications become available?
... <body> <div id="notificationarea"></div> <!-- rest of website --> </body> </html>
then create notifications in jquery:
$('#notificationarea').prepend('<div class="notification">this notification</div>');
its bit basic, should trick, , because "prepending" stacking looking for. can use append()
too, assuming you'd want recent notifications on top.
to "x" (close) button have link in notification class of notifcationclose
, do:
$('.notificationclose').click(function(){ $('this').parents('.notification').remove(); })
Comments
Post a Comment