01 – YUI 3.5 Javascript Datatable

How to use YUI 3.5 Datatable, the basics.

js/datatable.js

[crayon language="javascript"]
YUI().use(‘datatable’, function (Y) {
var data = [
{ id: "353", name: "Shanghai", country: "China", population: "17836133" },
{ id: "347", name: "Instanbul", country: "Turkey", population: "13483052" },
{ id: "456", name: "Karachi", country: "Pakistan", population: "13052000" }
];
var table = new Y.DataTable({
data: data,
columns: ["id", "name", "country", "population"]
});
table.render(“#cities”);
});
[/crayon]

index.html

[crayon language="html"]
< !doctype html>



YUI Datatable





[/crayon]

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>