Skip to content

Commit 3088f69

Browse files
committed
update $(document).ready
1 parent 75e3a18 commit 3088f69

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Ajax/common/traits/JsUtilsInternalTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ protected function _compileLibrary(BaseGui $library, &$view = NULL) {
2727
}
2828

2929
protected function defer($script) {
30-
$result = "window.defer=function (method) {if (window.jQuery) method(); else setTimeout(function() { defer(method) }, 50);};";
31-
$result .= "window.defer(function(){" . $script . "})";
30+
$result = "window.defer=function (method) {if (window.jQuery) method(); else setTimeout(function() { window.defer(method); }, 50);};";
31+
$result .= "window.defer(function(){" . $script . "});";
3232
return $result;
3333
}
3434

3535
protected function ready($script) {
36-
$result = '$(document).ready(function() {' . "\n";
37-
$result .= $script . '})';
36+
$result = '$(function() {' . "\n";
37+
$result .= $script . '});';
3838
return $result;
3939
}
4040

0 commit comments

Comments
 (0)