Source for file JavaScript.php
Documentation is available at JavaScript.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see https://nette.org
- 12: *
- 19: */
- 27: /**
- 28: * PHP to JavaScript helper.
- 29: *
- 30: * <code>
- 31: * $js = new JavaScript;
- 32: * $js->jQuery('.prod img')
- 33: * ->css('position', 'relative')
- 34: * ->animate(array('top' => '100px'));
- 35: * echo $js;
- 36: * </code>
- 37: *
- 41: */
- 43: {
- 52: {
- 55: }
- 59: /**
- 60: * Sets value of a JavaScript property.
- 64: */
- 66: {
- 75: }
- 78: }
- 82: /**
- 83: * Returns JavaScript property value.
- 86: */
- 88: {
- 98: }
- 101: }
- 105: /**
- 106: * Calls JavaScript function.
- 110: */
- 112: {
- 115: }
- 118: }
- 122: }
- 126: /**
- 127: * Appends user expressions.
- 130: */
- 132: {
- 136: }
- 138: }
- 142: /**
- 143: * Returns string represenation of JavaScript expression.
- 145: */
- 147: {
- 149: }
- 151: }