@@ 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 |
@@ 136-146 (lines=11) @@ | ||
133 | * @param string $param |
|
134 | * @param boolean $immediatly delayed if false |
|
135 | */ |
|
136 | public function _genericCallValue($jQueryCall,$element='this', $param="", $immediatly=false) { |
|
137 | $element=Javascript::prep_element($element); |
|
138 | if (isset($param)) { |
|
139 | $param=Javascript::prep_value($param); |
|
140 | $str="$({$element}).{$jQueryCall}({$param});"; |
|
141 | } else |
|
142 | $str="$({$element}).{$jQueryCall}();"; |
|
143 | if ($immediatly) |
|
144 | $this->jquery_code_for_compile[]=$str; |
|
145 | return $str; |
|
146 | } |
|
147 | /** |
|
148 | * Execute a generic jQuery call with 2 elements. |
|
149 | * @param string $jQueryCall |