Login   Register  
PHP Classes
elePHPant
Icontem

File: demos/001.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Schaefer  >  d3Jquery  >  demos/001.php  >  Download  
File: demos/001.php
Role: Example script
Content type: text/plain
Description: some basic snippets
Class: d3Jquery
Generate JavaScript code to access jQuery
Author: By
Last change: add hint
Date: 2013-01-10 10:42
Size: 833 bytes
 

Contents

Class file image Download
<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');