Cjax Framework


Elements Queries, Selector

As of Cjax 5.9+ the advanced selector engine is enabled by default. You don't longer need to enable this setting, as it already enabled.

Cjax 5.7+ includes a selector engine that can select complex queries, as these of known libraries. You can use wildcard selections specifying a class name or more complex selections.

Examples

Multiple Selections

You can add multiple buttons or elements in your HTML page, and add the same class ".bt", or any class you specify, and cjax will use these selectors to bind your elements with the assigned actions.



PHP

<?php

$ajax
->click(".bt",$ajax->call("ajax.php?click_ajax_request/click_button"));

?>

<!-- HTML -->
<input type='button' class='bt' value='Click this button to make an ajax request'>
<input type='button' class='bt' value='Click this button to make an ajax request'>
<input type='button' class='bt' value='Click this button to make an ajax request'>


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

CodeIgniter  ·  Copyright © 2006 - 2012  ·  Cjax