Cjax Framework


Replace an element with other element or with HTML.

Examples

PHP
<?php 

$ajax
->replace('#response',"<div id='response2'><span style='color:red'>#response</span> was replaced with this html</div>");
//Appending or moving an element to #response
$ajax->replace('#other_element',"#other_element2");

?>

Try it

#Response
 
#Other element
#Other element2: This element replace #Other element

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

CodeIgniter  ·  Copyright © 2006 - 2012  ·  Cjax