summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-30 20:22:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-30 20:22:10 -0400
commit9648acc7a4edd44a080f40d8e918b1388b24171a (patch)
tree52cbcbc30f2b0bc9be20ec3f0518f893f9c99b53 /templates
parent9b1ed7a7200e087ecf3cfa8288a1197da0751136 (diff)
got this JS working
Diffstat (limited to 'templates')
-rw-r--r--templates/longpolling.julius12
1 files changed, 5 insertions, 7 deletions
diff --git a/templates/longpolling.julius b/templates/longpolling.julius
index 29e533c41..d34d5b47d 100644
--- a/templates/longpolling.julius
+++ b/templates/longpolling.julius
@@ -1,11 +1,9 @@
// longpolling for #{ident}
function poller#{ident}() {
- if (longpoll('@{gethtml}', '#{ident}')) {
+ longpoll('@{gethtml}', '#{ident}', function() {
setTimeout(poller#{ident}, #{delay});
- }
-}
-(function( $ ) {
- $(document).bind('ready.app', function() {
- setTimeout(poller#{ident}, #{startdelay});
});
-})( jQuery );
+}
+$(function() {
+ setTimeout(poller#{ident}, #{startdelay});
+});