/**
* DataTables "Checkbox selection":
* https://datatables.net/extensions/select/examples/initialisation/checkbox.html
* DataTable is working with self made css checkboxes.
* Disadvantages:
* 1. Click a couple of times on the "selector" right after each other. For visitors
* this can be the case if they are making some mistakes and they want to correct the
* selection immidiately. Result: Not working, because there has to be some time
* between two clicks. In case of real checkboxes at least you don't have that problem
* when clicking on the checkbox itself.
* 2. The DataTables self made css checkbox is working with "text-shadow" in css to
* create some space around the checkmark, so the checkbox has some kind of
* opening. The disadvantage of this is that you have to change the color used in
* "text-shadow" if the background color is changing. The advantage of just using
* real checkboxes is that you don't have that problem and if users want to style
* their real checkboxes that's also still possible.
*
* "Checkbox selection" select all:
* DataTables has a button option for that, but i think it's better to make a
* cell for that in the "thead". Visitors are not really used to a button for that,
* so they have to search for it. It also cost you space on the page while you
* don't use the space in the thead for the "checkbox selection" column.
*
* With that in mind rewrite the DataTables "Checkbox selection" with the "select all"
* option.
*
* Initialising: select
* In this case use "style: 'multi'", because you want to have to ability to select / check
* more rows.
* Use also "selector: 'td:first-child'", because you only want to select / check the row
* if you click on the first td child of the row. Without this you also could click cells
* in other columns to select / check the row. If you have for example links in your table data
* you don't wanna select / check a row if you click on the link. You can avoid this with
*...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.