document.addEventListener("DOMContentLoaded", function() { new Fancy.Grid({ title: 'Title', subTitle: 'Sub Title', renderTo: 'container', width: 450, height: 400, selModel: 'cell', data: { fields: ['name', 'surname', 'position', 'email', 'company', 'age', 'knowledge'], items: data }, defaults: { type: 'string', ellipsis: true, width: 100 }, columns: [{ index: 'company', title: 'Company' }, { index: 'name', title: 'Name' }, { index: 'surname', title: 'Sur Name' }, { index: 'age', title: 'Age', width: 50, type: 'number' }] }); }); var data = [ ['Ted', 'Smith', 'Java Developer', '[email protected]', 'Electrical Systems', 30, 'Java, Ruby'], ['Ed', 'Johnson', 'C/C++ Market Data Developer', '[email protected]', 'Energy and Oil', 35, 'C++'], ['Sam', 'Williams', 'Technical Analyst', '[email protected]', 'Airbus', 38, ''], ['Alexander', 'Brown', 'Project Manager', '[email protected]', 'Renault', 24, ''], ['Nicholas', 'Miller', 'Senior Software Engineer', '[email protected]', 'Adobe', 33, 'Unix, C/C++'], ['Andrew', 'Thompson', 'Agile Project Manager', '[email protected]', 'Google', 28, ''], ['Ryan', 'Walker', 'Application Support Engineer', '[email protected]', 'Siemens', 39, 'ActionScript'], ['John', 'Scott', 'Flex Developer', '[email protected]', 'Cargo', 45, 'Flex'], ['James', 'Phillips', 'Senior C++/C# Developer', '[email protected]', 'Pro bugs', 30, 'C/C++, Unix'], ['Brian', 'Edwards', 'UNIX/C++ Developer', '[email protected]', 'IT Consultant', 23, 'C/C++ Unix'], ['Jack', 'Richardson', 'Ruby Developer', '[email protected]', 'Europe IT', 24, 'Ruby'], ['Alex', 'Howard', 'CSS3/HTML5 Developer', '[email protected]', 'Cisco', 27, 'CSS3/HTML5'], ['Carlos', 'Wood', 'Node.js Developer', '[email protected]', 'HP', 36, 'Node.js'], ['Adrian', 'Russell', 'Frontend Developer', '[email protected]', 'Micro Systems', 31, 'HTML, JavaScript'], ['Jeremy', 'Hamilton', 'Scala Developer', '[email protected]', 'Big Machines', 30, 'Scala'], ['Ivan', 'Woods', 'Objective C Developer', '[email protected]', '', 24, 'Objective C'], ['Peter', 'West', 'PHP/HTML Developer', '[email protected]', 'Adobe', 26, 'PHP/HTML'], ['Scott', 'Simpson', 'Designer', '[email protected]', 'IBM', 29, 'Adobe PhotoShop'], ['Lorenzo', 'Tucker', 'Architect', '[email protected]', 'Intel', 29, ''], ['Randy', 'Grant', 'Engineer', '[email protected]', 'Bridges', 30, ''], ['Arthur', 'Gardner', 'Analytic', '[email protected]', 'Google', 31, ''], ['Orlando', 'Ruiz', 'Unit Testing Developer', '[email protected]', 'Apple', 32, ''] ];
<script src="https://cdn.fancygrid.com/fancy.min.js"></script> <div id="container"></div>