You want to initiate the download if at least two checkboxes are checked?
In that case, try using this:
$(document).ready(function() {
$("#download").click(function() {
var count = 0;
if ($('#temperature').prop('checked')) count++;
if ($('#illuminance').prop('checked')) count++;
if ($('#button-state').prop('checked')) count++;
if (count > 1) {
window.location.href="https://api.thingspeak.com/channels/899906/feeds.csv?start=2019-11-12%2019:11:12&end=2019-11-13%2019:11:13";
}
});
});
2
solved How to make your checkbox work with your Jquery functionality?