Cjax Framework


Remove events from an element. Lets say you used $ajax->click() to add one or more requests to a link, and maybe other APis. Flush, will clear all events set to that element. This allows you to re-use that element.

Examples

PHP
<?php 

//add an ajax request to #link1
$ajax->click('#link1'$ajax->call('ajax.php?flush/flush_element'));

//in the controller we flush it..
//so if you click the link again, it is clean and won't do anything.

//controller
class flush {

    function 
flush_element()
    {
        
$ajax ajax();
        
//Flus link1 HTML
        
$ajax->flush('#link1');
    }
}

?>
link1

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

CodeIgniter  ·  Copyright © 2006 - 2012  ·  Cjax