Creative Tim

Fresh Bootstrap Table - Tutorial
This tutorial was made to make the integration as easy as possible.

We restyled the classic Bootstrap Table and made it look fresh and bright. Here are the files that you need to add in your project.


<!-- Style -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<link href="assets/css/fresh-bootstrap-table.css" rel="stylesheet" />

<!-- Fonts and icons -->
<link href="" rel="stylesheet">
<link href=',700,300' rel='stylesheet' type='text/css'>


This is the main HTML code for the Fresh Bootstrap Table. You can create a table with any data or whatever you want. More details about the methods, data manipulations or functions available with this Bootstrap Table can be found here.

<div class="fresh-table full-color-orange">
    <!--    Available colors for the full background: full-color-blue, full-color-azure, full-color-green, full-color-red, full-color-orange
            Available colors only for the toolbar: toolbar-color-blue, toolbar-color-azure, toolbar-color-green, toolbar-color-red, toolbar-color-orange

        <div class="toolbar">
            <button id="alertBtn" class="btn btn-default">Alert</button>

        <table id="fresh-table" class="table">
                <th data-field="id">ID</th>
            	<th data-field="name">Name</th>
            	<th data-field="salary">Salary</th>
            	<th data-field="country">Country</th>
            	<th data-field="city">City</th>
            	<th data-field="actions" data-formatter="operateFormatter" data-events="operateEvents">Actions</th>
                	<td>Dakota Rice</td>
                	<td>Minerva Hooper</td>
                	<td>Sage Rodriguez</td>
                	<td>Philip Chaney</td>
                	<td>Korea, South</td>
                	<td>Overland Park</td>
                	<td>Doris Greene</td>
                	<td>Feldkirchen in Kärnten</td>
                	<td>Mason Porter</td>
                	<td>Alden Chen</td>
                	<td>Colton Hodges</td>
                	<td>Illana Nelson</td>
                	<td>Heard Island</td>
                	<td>Nicole Lane</td>
                	<td>Cayman Islands</td>
                	<td>Chaim Saunders</td>
                	<td>New Quay</td>
                	<td>Josiah Simon</td>
                	<td>Christmas Island</td>
                	<td>Ila Poole</td>
                	<td>Shana Mejia</td>
                	<td>Lana Ryan</td>
                	<td>Daquan Bender</td>
                	<td>Sao Tome and Principe</td>
                	<td>Connor Wagner</td>
                	<td>Boris Horton</td>
                	<td>Winifred Ryan</td>


Here are the javascript files that you have to include and the Javascript plugin that you have to call in your page. The core code for the Fresh Bootstrap Table can be found in the 'bootstrap-table.js'. Here is the code for initialising the table in your page:

 <!-- Javascript -->
<script type="text/javascript" src="assets/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.js"></script>
<script type="text/javascript" src="assets/js/bootstrap-table.js"></script>

<script type="text/javascript">
        var $table = $('#fresh-table'),
            $alertBtn = $('#alertBtn'),
            full_screen = false;

                toolbar: ".toolbar",

                showRefresh: true,
                search: true,
                showToggle: true,
                showColumns: true,
                pagination: true,
                striped: true,
                sortable: true,
                pageSize: 8,
                pageList: [8,10,25,50,100],

                formatShowingRows: function(pageFrom, pageTo, totalRows){
                    //do nothing here, we don't want to show the text "showing x of y from..."
                formatRecordsPerPage: function(pageNumber){
                    return pageNumber + " rows visible";
                icons: {
                    refresh: 'fa fa-refresh',
                    toggle: 'fa fa-th-list',
                    columns: 'fa fa-columns',
                    detailOpen: 'fa fa-plus-circle',
                    detailClose: 'fa fa-minus-circle'

        $(function () {
            $ () {
                alert("You pressed on Alert");

        function operateFormatter(value, row, index) {
            return [
                '<a rel="tooltip" title="Like" class="table-action like" href="javascript:void(0)" title="Like">',
                    '<i class="fa fa-heart"></i>',
                '<a rel="tooltip" title="Edit" class="table-action edit" href="javascript:void(0)" title="Edit">',
                    '<i class="fa fa-edit"></i>',
                '<a rel="tooltip" title="Remove" class="table-action remove" href="javascript:void(0)" title="Remove">',
                    '<i class="fa fa-remove"></i>',

        window.operateEvents = {
            'click .like': function (e, value, row, index) {
                alert('You click like icon, row: ' + JSON.stringify(row));
                console.log(value, row, index);
            'click .edit': function (e, value, row, index) {
                console.log(value, row, index);
            'click .remove': function (e, value, row, index) {
                alert('You click remove icon, row: ' + JSON.stringify(row));
                console.log(value, row, index);



Besides the default style, we added 5 new colors for the background of Fresh Bootstrap Table and for it's Toolbar: blue, azure, green, orange, red. If you want to use one of them, you can use the class for the chosen color: "full-color-{blue | azure | green | orange | red}" or "toolbar-color-{blue | azure | green | orange | red}".

If you want to use the table as Full Screen you have to add the class "full-screen-table" for the save "div" that has the class "fresh-table".

Many thanks to our friend for open sourcing the base for this Bootstrap Table. More details can be found here here.

Get more useful items for Bootstrap on Creative Tim.

Copyright © 2015 Creative Tim, made with for a better web.