| @@ 22-32 (lines=11) @@ | ||
| 19 | * @param string $value |
|
| 20 | * @param boolean $immediatly delayed if false |
|
| 21 | */ |
|
| 22 | public function _attr($element='this', $attributeName, $value="", $immediatly=false) { |
|
| 23 | $element=Javascript::prep_element($element); |
|
| 24 | if (isset($value)) { |
|
| 25 | $value=Javascript::prep_value($value); |
|
| 26 | $str="$({$element}).attr(\"$attributeName\",{$value});"; |
|
| 27 | } else |
|
| 28 | $str="$({$element}).attr(\"$attributeName\");"; |
|
| 29 | if ($immediatly) |
|
| 30 | $this->jquery_code_for_compile[]=$str; |
|
| 31 | return $str; |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Insert content, specified by the parameter, after each element in the set of matched elements |
|
| @@ 134-144 (lines=11) @@ | ||
| 131 | * @param string $param |
|
| 132 | * @param boolean $immediatly delayed if false |
|
| 133 | */ |
|
| 134 | public function _genericCallValue($jQueryCall,$element='this', $param="", $immediatly=false) { |
|
| 135 | $element=Javascript::prep_element($element); |
|
| 136 | if (isset($param)) { |
|
| 137 | $param=Javascript::prep_value($param); |
|
| 138 | $str="$({$element}).{$jQueryCall}({$param});"; |
|
| 139 | } else |
|
| 140 | $str="$({$element}).{$jQueryCall}();"; |
|
| 141 | if ($immediatly) |
|
| 142 | $this->jquery_code_for_compile[]=$str; |
|
| 143 | return $str; |
|
| 144 | } |
|
| 145 | /** |
|
| 146 | * Execute a generic jQuery call with 2 elements. |
|
| 147 | * @param string $jQueryCall |
|