<input type="checkbox" name="cars" value="ferrari" id="F40" onclick="addToBasket(this);">F40
function addToBasket() {
var bkval = $(this).val();
console.log(bkval);
}
Why is jQuery not getting the value of the checkbox? I can't seem to understand why, it gets the value fine if I use a standard onClick but it doesn't seem to like calling the function...
thisif you're not using it?)