|
@@ 361-368 (lines=8) @@
|
| 358 |
|
* @param boolean $immediatly defers the execution if set to false |
| 359 |
|
* @return string |
| 360 |
|
*/ |
| 361 |
|
public function toggle($element='this', $immediatly=false) { |
| 362 |
|
$element=Javascript::prep_element($element); |
| 363 |
|
$str="$({$element}).toggle();"; |
| 364 |
|
|
| 365 |
|
if ($immediatly) |
| 366 |
|
$this->jquery_code_for_compile[]=$str; |
| 367 |
|
return $str; |
| 368 |
|
} |
| 369 |
|
|
| 370 |
|
/** |
| 371 |
|
* Execute a javascript library toggle class action |
|
@@ 387-394 (lines=8) @@
|
| 384 |
|
* @param string $event |
| 385 |
|
* @param boolean $immediatly defers the execution if set to false |
| 386 |
|
*/ |
| 387 |
|
public function trigger($element='this', $event='click', $immediatly=false) { |
| 388 |
|
$element=Javascript::prep_element($element); |
| 389 |
|
$str="$({$element}).trigger(\"$event\");"; |
| 390 |
|
|
| 391 |
|
if ($immediatly) |
| 392 |
|
$this->jquery_code_for_compile[]=$str; |
| 393 |
|
return $str; |
| 394 |
|
} |
| 395 |
|
|
| 396 |
|
/** |
| 397 |
|
* Execute a javascript library show action |