<div id="save" style="display:none">Сохранено</div>
$(function () {
LoadText();
});
function SaveText() {
var text = $("#text").val();
VK.api("storage.set", { key: "text", value: text }, function (data) {
$('#save').fadeIn(300, function()
{
var save = $(this);
setTimeout(function()
{
save.fadeOut(300);
}, 3000);
});
});
}
function LoadText() {
VK.api("storage.get", { key: "text" }, function (data) {
$("#text").val(data.response);
});
}