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]
Recent Comments