简体   繁体   中英

external link in a table with DataTables (a plug-in for jQuery)

I have a table here which is built using a JSON file and DataTables (a plug-in for the jQuery Javascript library). The table can be filtered and the plug-in works.

The cells in the first column contain a link to an external website, which opens in a different tab (I used target="_blank" ). When I apply filter to the table, its rows are filtered correctly but as I click on a link all filters are reset and the entire table is shown .

Any tips to work around this?

It turned out to be a small bug in the previous repository of DataTables. Following this discussion , I solved the issue by using the latest release of the pug-in. Now the links in the first column do not cause the entire table to redraw.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM