Seaside的定期JQuery更新

我正在使用Seaside(Squeak 4.2中的2.8),我通常会像这样更新:

html div 
    onClick: ((html jQuery: '#asdf') load html: [:h|h text: 'qwer'])
    ; with: 'asdf'.

但这一次,我必须定期更新div.

我在另一个项目中使用了PT的periodicalEvaluator,但是在这个我不能,我必须坚持使用JQ.

我尝试使用JQInstance的延迟:millis在我能想到的所有组合中:

onClick: (((html jQuery id: 'chattertext') delay: 1000; yourself) load html: [:h| self renderTextOn: h])
; onClick: (((html jQuery id: 'chattertext') delay: 1000) load html: [:h| self renderTextOn: h])
; onClick: (((html jQuery id: 'chattertext') delay: 1000; load) html: [:h| self renderTextOn: h])
and others

出于某种原因,更新是瞬时的,而不是在我需要的1000毫秒之后.

解决方法

看看JQuery功能测试套件附带的示例:

JQRepeatingFunctionalTest>>#renderContentOn: html
  html paragraph
    script: (html jQuery this load
      html: [ :r | self renderTimeOn: r ];
      interval: 1 seconds); 
  with: [ self renderTimeOn: html ]

该示例运行here.

相关文章

1.第一步 设置响应头 header('Access-Control-Allow...
$.inArray()方法介绍 $.inArray()函数用于在数组中搜索指定的...
jquery.serializejson.min.js的妙用 关于这个jquery.seriali...
JS 将form表单数据快速转化为object对象(json对象) jaymou...
jQuery插件之jquery.spinner数字智能增减插件 参考地址:http...