@@ 60-70 (lines=11) @@ | ||
57 | * @param string $param |
|
58 | * @param boolean $immediatly delayed if false |
|
59 | */ |
|
60 | public function _genericCallValue($jQueryCall,$element='this', $param="", $immediatly=false) { |
|
61 | $element=Javascript::prep_element($element); |
|
62 | if (isset($param)) { |
|
63 | $param=Javascript::prep_value($param); |
|
64 | $str="$({$element}).{$jQueryCall}({$param});"; |
|
65 | } else |
|
66 | $str="$({$element}).{$jQueryCall}();"; |
|
67 | if ($immediatly) |
|
68 | $this->jquery_code_for_compile[]=$str; |
|
69 | return $str; |
|
70 | } |
|
71 | ||
72 | /** |
|
73 | * Execute a generic jQuery call with 2 elements. |
|
@@ 129-139 (lines=11) @@ | ||
126 | * @param string $value |
|
127 | * @param boolean $immediatly delayed if false |
|
128 | */ |
|
129 | public function attr($element='this', $attributeName, $value="", $immediatly=false) { |
|
130 | $element=Javascript::prep_element($element); |
|
131 | if (isset($value)) { |
|
132 | $value=Javascript::prep_value($value); |
|
133 | $str="$({$element}).attr(\"$attributeName\",{$value});"; |
|
134 | } else |
|
135 | $str="$({$element}).attr(\"$attributeName\");"; |
|
136 | if ($immediatly) |
|
137 | $this->jquery_code_for_compile[]=$str; |
|
138 | return $str; |
|
139 | } |
|
140 | ||
141 | /** |
|
142 | * Get or set the value of the first element in the set of matched elements or set one or more attributes for every matched element. |