Hi, I'm using datatable in my project and we have a function to jump to a page, and I use the input plugin, but it doesn't work.
Please help.
datatable version is 1.10.13 refer to this.
/*!
DataTables 1.10.13
©2008-2016 SpryMedia Ltd - datatables.net/license
*/
<script type="text/javascript" src="${ctx}/assets/jslib/jquery.dataTables.js"></script>
<script type="text/javascript" src="${ctx}/assets/jslib/datatable/input.js"></script>
<script>
var oTable = $('#selfConnectionGrid').dataTable({
"bProcessing": false, //显示是否加载
"sScrollX":"100%",
"bJQueryUI": true,
"bFilter": false,
"sScrollY": 400,
"bSort": true,
"bInfo": false,
"bDestroy":true,
"iDisplayLength":10,
//"aaSorting": [[ 2, "desc" ]],//给列表排序 ,第一个参数表示数组 。4 就是css grade那列。第二个参数为 desc或是asc
"sScrollXInner": "100%",
"pagingType": "input",
"sAjaxSource":"queryCreditAssociation",
"bSort": false, //关闭排序
"bServerSide":true,//打开服务器模式,这个是最重要的
"bLengthChange":false, //关闭每页显示多少条数据
"fnServerData":retrieveData,//自定义数据获取函数
//"sColumns":["id","productCode","name",connectionType,grantQuota,approvalAmount,status,result,reason,edate],
"aoColumns": [
{ "mDataProp": "id",
render:function(data,type,row,meta) {
var a = '<a href="'+contectPath+'\/creditDetail?id='+data+'" target="_blank">'+data+'</a>'
return a;
}
},
{ "mDataProp": "productCode"},
{ "mDataProp": "name"},
{ "mDataProp": "connectionType"},
{ "mDataProp": "grantQuota" },
{ "mDataProp": "approvalAmount"},
{ "mDataProp": "status"},
{ "mDataProp": "result",
render:function(data,type,row,meta) {
var a;
if(data.indexOf("退回") > 0){
a = '<span class="btn-red">'+data+'</span>'
}else if(data.indexOf("通过") > 0){
a = '<span class="btn-green">'+data+'</span>'
}else{
a = data
}
return a;
}
},
{ "mDataProp": "reason"},
{ "mDataProp": "edate"}
]
}
</script>