@@ 59-69 (lines=11) @@ | ||
56 | * @param string $param |
|
57 | * @param boolean $immediatly delayed if false |
|
58 | */ |
|
59 | public function _genericCallValue($jQueryCall,$element='this', $param="", $immediatly=false) { |
|
60 | $element=Javascript::prep_element($element); |
|
61 | if (isset($param)) { |
|
62 | $param=Javascript::prep_value($param); |
|
63 | $str="$({$element}).{$jQueryCall}({$param});"; |
|
64 | } else |
|
65 | $str="$({$element}).{$jQueryCall}();"; |
|
66 | if ($immediatly) |
|
67 | $this->jquery_code_for_compile[]=$str; |
|
68 | return $str; |
|
69 | } |
|
70 | ||
71 | /** |
|
72 | * Execute a generic jQuery call with 2 elements. |
|
@@ 128-138 (lines=11) @@ | ||
125 | * @param string $value |
|
126 | * @param boolean $immediatly delayed if false |
|
127 | */ |
|
128 | public function attr($element='this', $attributeName, $value="", $immediatly=false) { |
|
129 | $element=Javascript::prep_element($element); |
|
130 | if (isset($value)) { |
|
131 | $value=Javascript::prep_value($value); |
|
132 | $str="$({$element}).attr(\"$attributeName\",{$value});"; |
|
133 | } else |
|
134 | $str="$({$element}).attr(\"$attributeName\");"; |
|
135 | if ($immediatly) |
|
136 | $this->jquery_code_for_compile[]=$str; |
|
137 | return $str; |
|
138 | } |
|
139 | ||
140 | /** |
|
141 | * 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. |