This is quite easy to do in jQuery - this is my version from http://www.odford.co.uk/ and it occurs whenever you rate an entry.
This is the div that we will populate and show
<div id="ajaxcallback" style="top: 0px; position: absolute; display: none;">
</div>
This is the script that does all of that (it also hides it after a short delay - you may not wish to do that).
$("#ajaxcallback").html("<a href='blah'>Some Notice</a>").css({
top:getScrollTop()+"px"
});
$("#ajaxcallback").show("slow");
window.setTimeout(function () { $("#ajaxcallback").hide("slow"); }, 2000);
If you are interested in placing it "in view" no matter on where the page is scrolled you'll need something like this - if you want it to only appear right at the top, you don't need this and you can remove the .css({ top:getScrollTop.... stuff from the script.
function getScrollTop() {
var ScrollTop = document.body.scrollTop;
if (ScrollTop === 0) {
if (window.pageYOffset) {
ScrollTop = window.pageYOffset;
} else {
ScrollTop = (document.body.parentElement) ?
document.body.parentElement.scrollTop : 0;
}
}
return ScrollTop;
}