Cjax Framework


Binding actions, means you can pass multiple actions all at once in a single $ajax line, when genereally it is one action per line. You may bind as many commands as needed inside the triggers click(), blur(), change(), keyup(), keydown(), function.

Examples

Normal
This is an example how you genereally only pass one action to an event. See below for multiple action bind to an event.
PHP
<?php 

    
//Normal, only one actions passed.
    
$ajax->click("#link1",$ajax->call("ajax.php?bind/link2"),);
    
?>
Bind Multiple Actions
PHP
<?php 

    
//default event is "click"
    
$ajax->click("#link1",
        array(
            
$ajax->call("ajax.php?bind/link2"),
            
$ajax->succcess("Hello World 1"),
            
$ajax->overlayCotent("Hello World 2"),
        )
    );


    
//change color of the link, when it loses color
    
$ajax->blur("#link2"$ajax->prop(array('color' => 'red')));



    
//ajax request when text in a text field changes
    
$ajax->change("#textfield",$ajax->call("ajax.php?bind/link2/|textfield|"));

    
?>

Previous Topic:  Previous Class    ·   Top of Page   ·   Demos Home   ·  

CodeIgniter  ·  Copyright © 2006 - 2012  ·  Cjax