ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
with_js_binding.php
Go to the documentation of this file.
1<?php
2function with_js_binding() {
3 global $DIC;
4 $f = $DIC->ui()->factory();
5 $renderer = $DIC->ui()->renderer();
6
7 return $renderer->render(
8 $f->glyph()->user("#")
9 ->withOnLoadCode(function($id) {
10 return
11 "$(\"#$id\").click(function() { alert(\"Clicked: $id\"); return false; });";
12 })
13 );
14}
with_js_binding()
An exception for terminatinating execution or to throw for unit testing.
global $DIC