ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
with_js_binding.php File Reference

Go to the source code of this file.

Functions

 with_js_binding ()
 

Function Documentation

◆ with_js_binding()

with_js_binding ( )

Definition at line 2 of file with_js_binding.php.

References $DIC.

2  {
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 }
global $DIC