jQuery JSON-to-HTML Table Plugin Columns

Add-ons
2026-07-26 01:20 4 次浏览 • 0 次下载 53.1KB
jQuery JSON-to-HTML Table Plugin Columns

Columns: Convert JSON Data into HTML Tables


Include the jQuery library (version 1.7 or later) and the Columns plugin files:

1
2
<script src="js/jquery.columns-2.0.min.js"></script>


Include a prebuilt column or create your own theme

1
<link rel="stylesheet" href="css/classic.css">


Since dynamic column creation generates all the required HTML, the only HTML needed is an empty HTML element, such as a <div> tag, with a corresponding id for initialization.

1
<div id="columns"></div>


Finally, initialize Columns.

1
2
3
4
5
6
<script>
$(document).ready(function() {
var json = [{"col1":"row1", "col2":"row1", "col3":"row1"}, {"col1":"row2", "col2":"row2", "col3":"row2"}];
$('#columns').columns({data:json});
});
</script>

For detailed Columns parameters, see the demo.

星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare