$('input[name=boxes], .item_add a ').on('click', function(e) {
e.preventDefault();
//do stuff inherent to both
}
Is there a way to prevent the default action of scrolling when I click on a link [.item add a], but still keep the default action of checking and unchecking a checkbox input[name=boxes] without breaking these two into seperate onclick functions?
1 Answer