changeset 28 | 9b7067bfaa15 |
parent 0 | b97547f5f1fa |
child 643 | 616191014b8b |
child 1808 | aa09e20dd8c0 |
--- a/common/utils.py Tue Nov 11 16:17:50 2008 -0800 +++ b/common/utils.py Wed Nov 12 16:07:40 2008 +0100 @@ -141,6 +141,12 @@ def add_post_inline_script(self, content): self.post_inlined_scripts.append(content) + + def add_onload(self, jscode): + self.add_post_inline_script(u"""jQuery(document).ready(function () { + %s + });""" % jscode) + def add_js(self, jsfile): """adds `jsfile` to the list of javascripts used in the webpage