I have a select element with id settings-select.These are the two different ways I am binding event.Why is 'this' value not bound to select element even after using 'bind' in second method.
1.
$('body').on( 'change', '#settings-select', function() {
console.log( $(this).val ); // outputs correct select value
});
2.
$('body').on( 'change', '#settings-select', selectSettings.bind( this ) );
function selectSettings() {
console.log( $(this).val() );// Throws error. this -> window object. Why?
}