yes it is fairly easy! And already closely answered on another topic here on SO.
To get an idea, hence the following simple code below.
PS: This is taken from
mouseover while mousedown
You only have to replace the .node wit ha class your checkboxes have in common, and instead of setting css you have to toggle (or check) your selector (i.e: your checkbox)
Enjoy... :)
$(document).ready(function(){
var isDown = false; // Tracks status of mouse button
$(document).mousedown(function() {
isDown = true; // When mouse goes down, set isDown to true
})
.mouseup(function() {
isDown = false; // When mouse goes up, set isDown to false
});
$(".node").mouseover(function(){
if(isDown) { // Only change css if mouse is down
$(this).css({background:"#333333"});
}
});
});
Edit:
To check/uncheck a checkbox you may use
$('.myCheckbox').prop('checked', true);