开发者

JQuery: Datatables - Column Filtering Plugin

开发者 https://www.devze.com 2023-03-23 06:49 出处:网络
I\'m attempting you the plugin found here (http://jquery-datatables-column-filter.googlecode.com/svn/trunk/default.html) on my datatables that are populated via AJAX, but when following the instructio

I'm attempting you the plugin found here (http://jquery-datatables-column-filter.googlecode.com/svn/trunk/default.html) on my datatables that are populated via AJAX, but when following the instructions in the example for adding the required footer to the table:

<tfoot>
        <tr>
            <th>Rendering engine</th>
            <th>Browser</th>
            <th>Platform(s)</th>
            <th>Eng开发者_如何学编程ine version</th>
            <th>CSS grade</th>
        </tr>
    </tfoot>

I wind up simply with a footer row w/labels and not the text boxes as shown in the example.

Any thoughts on what I need to do to correct this? Thanks!


Did you add this to you .datatable javascript?

$(document).ready( function () {
        $('#example').dataTable()**.columnFilter()**;
}


Thanks for the assistance. I wound up trying a few different locations for the location of the $('#example').dataTable().columnFilter(); call, and since I'm using AJAX, I needed to have it positioned during the rendering of my table.

Something such as:

if( typeof dataTable == 'undefined' )
dataTable = $('#eventRecords').dataTable({"bJQueryUI": true}).columnFilter();    
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号