| @@ 276-286 (lines=11) @@ | ||
| 273 | * |
|
| 274 | * @return \Jaxon\Plugin\Response |
|
| 275 | */ |
|
| 276 | public function assign($sTarget, $sAttribute, $sData) |
|
| 277 | { |
|
| 278 | return $this->addCommand( |
|
| 279 | [ |
|
| 280 | 'cmd' => 'as', |
|
| 281 | 'id' => trim((string)$sTarget, " \t"), |
|
| 282 | 'prop' => trim((string)$sAttribute, " \t") |
|
| 283 | ], |
|
| 284 | trim((string)$sData, " \t\n") |
|
| 285 | ); |
|
| 286 | } |
|
| 287 | ||
| 288 | /** |
|
| 289 | * Add a command to assign the specified HTML content to the given element |
|
| @@ 312-322 (lines=11) @@ | ||
| 309 | * |
|
| 310 | * @return \Jaxon\Plugin\Response |
|
| 311 | */ |
|
| 312 | public function append($sTarget, $sAttribute, $sData) |
|
| 313 | { |
|
| 314 | return $this->addCommand( |
|
| 315 | [ |
|
| 316 | 'cmd' => 'ap', |
|
| 317 | 'id' => trim((string)$sTarget, " \t"), |
|
| 318 | 'prop' => trim((string)$sAttribute, " \t") |
|
| 319 | ], |
|
| 320 | trim((string)$sData, " \t\n") |
|
| 321 | ); |
|
| 322 | } |
|
| 323 | ||
| 324 | /** |
|
| 325 | * Add a command to prepend the specified data to the given element's attribute |
|
| @@ 333-343 (lines=11) @@ | ||
| 330 | * |
|
| 331 | * @return \Jaxon\Plugin\Response |
|
| 332 | */ |
|
| 333 | public function prepend($sTarget, $sAttribute, $sData) |
|
| 334 | { |
|
| 335 | return $this->addCommand( |
|
| 336 | [ |
|
| 337 | 'cmd' => 'pp', |
|
| 338 | 'id' => trim((string)$sTarget, " \t"), |
|
| 339 | 'prop' => trim((string)$sAttribute, " \t") |
|
| 340 | ], |
|
| 341 | trim((string)$sData, " \t\n") |
|
| 342 | ); |
|
| 343 | } |
|
| 344 | ||
| 345 | /** |
|
| 346 | * Add a command to replace a specified value with another value within the given element's attribute |
|