tweaks to save logic
This commit is contained in:
parent
252abae03d
commit
be45483df9
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
||||||
|
// save after half-second delay after typing
|
||||||
var timer = null;
|
var timer = null;
|
||||||
$('textarea').keyup(function () {
|
$('textarea').keyup(function () {
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
@ -31,9 +32,7 @@ $(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 20 second interval
|
// 20 second interval
|
||||||
setInterval(saveContent, 60000);
|
// setInterval(saveContent, 60000);
|
||||||
|
|
||||||
//onbeforeunload = saveContent();
|
|
||||||
|
|
||||||
// support tab key in textarea
|
// support tab key in textarea
|
||||||
$('textarea').keydown(function (e) {
|
$('textarea').keydown(function (e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user