Created
June 14, 2009 21:48
-
-
Save cers/129831 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var klass = "_jetpackNotification"; | |
jetpack.tabs.onReady(function(doc){ | |
$("body",doc).append('<div id="'+klass+'" style="position: fixed; bottom: 0; right: 0; height: 0; width: 151px;"><div style="height: 40px; width: 150px; background: #ddd; border: #999 solid; border-width: 1px 0 0 1px"></div></div>'); | |
}); | |
function notify(options) { | |
var doc = jetpack.tabs.focused.contentDocument; | |
$("#"+klass+" div", doc).text(options.body).parent().animate({"height":41},"slow", function(){ | |
setTimeout(function(el){$(el).animate({"height":0},"slow")},3000,this); | |
}); | |
} | |
// instead of jetpack.notifications.show(), call notify() with the same argument |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment