Hi, as developers sometimes we had to create a list of checkbox and maybe one of the requirements was add an All button, so this is an easy plugin that take care about the all button and his functionality.
This plugin has an example of how use it.
Also you can try this plugin here