<pre><?php 
 
// http://www.phpclasses.org/package/7801-PHP-Output-charts-using-D3-js-JavaScript-library.html
 
// download path for d3 package
 
include_once '../d3.classes.inc.php';
 
include_once '../jquery.classes.inc.php';
 
 
#echo jquery()->noConflict();
 
 
echo jquery(document()->getElementById("chart"));
 
 
echo jquery()->each(array(123), func("e")->add(jquery::unescape("return 1;")))->colon()->linebreak();
 
 
echo jquery("ul li:last")
 
    ->addClass(function($index){return "item-".$index;})->colon();
 
 
echo jquery("#dataTable tbody")
 
    ->on("click", function($ev){alert(jQuery($this)->text());})
 
    ->colon()->linebreak();
 
 
 
echo jquery("ul.first")->css(array("background-color"=>"red", "color"=>"#000000"))->colon()->linebreak();
 
 
echo jquery('li.third-item')->nextAll()->andSelf()
 
  ->css('background-color', 'red');
 
 |