Quantcast
Channel: how I can add extra my attribute into bootstrapTable - Stack Overflow
Viewing all articles
Browse latest Browse all 2

how I can add extra my attribute into bootstrapTable

$
0
0

I used bootstrapTable.js plugin https://github.com/wenzhixin/bootstrap-tableto create datatable ,I populated table by Json

but I need to control in my td tag as add some extra attribute in td tagas I wrote in my code "data-symbole" attribute,but the plugin remove it can anyone help me please

var x = [    {"id": 0,"name": "test0","price": "$0"        ,"pricesymbole":"$"    },    {"id": 1,"name": "test1","price": "$1"      ,"pricesymbole":"$"    },    {"id": 2,"name": "test2","price": "$2"      ,"pricesymbole":"$"    },    {"id": 3,"name": "test3","price": "$3"      ,"pricesymbole":"$"    }];$(function () {    $('#table').bootstrapTable({        data: x    });});
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"><!-- Latest compiled and minified CSS --><link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.10.1/bootstrap-table.min.css"><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script><script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script><script src="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.10.1/bootstrap-table.min.js"></script><table id="table"><thead><tr id="tr_{{id}}"><th data-field="id">Item ID</th><th data-field="name">Item Name</th><th data-field="price" data-symbole="pricesymbole">Item Price</th></tr></thead></table>

Viewing all articles
Browse latest Browse all 2

Trending Articles