Answer & Solution
$(document).keydown(function(event) {...});
$(document).keydown(function(event) {...});
How to unbind a specific click event handler function from all<code><button>
elements using jQuery?
A). $('button').unbind('click', clickHandler);
B). $('button').off('click', clickHandler);
C). $('button').removeEventListener('click', clickHandler);
D). $('button').off(clickHandler);
Which jQuery method is used to bind event handlers to elements that match a selector, now and in the future?
A). $(document).on(eventType, selector, function() {...});
B). $(document).bind(eventType, selector, function() {...});
C). $(document).delegate(selector, eventType, function() {...});
D). $(document).live(selector, eventType, function() {...});
Which jQuery method is used to bind event handlers for future elements?
A). $('element').live();
B). $('element').attach();
C). $('element').on();
D). $('element').delegate();
How to bind a focus event handler to all<input>
elements using jQuery?
A). $('input').on('focus', function() {...});
B). $('input').addEventListener('focus', function() {...});
C). $('input').bind('focus', function() {...});
D). $('input').focus(function() {...});
Which jQuery method is used to bind event handlers to the document itself?
A). $(document).on();
B). $(document).bind();
C). $(document).attach();
D). $(document).delegate();
How to bind a scroll event handler to the window using jQuery?
A). $(window).scroll(function() {...});
B). window.addEventListener('scroll', function() {...});
C). $('window').bind('scroll', function() {...});
D). $('window').on('scroll', function() {...});
Which jQuery method is commonly used to bind event handlers to DOM elements?
A). $('element').bind();
B). $('element').attach();
C). $('element').on();
D). $('element').trigger();
Which method is used to bind a one-time event handler to a DOM element in jQuery?
A). $('element').once();
B). $('element').one();
C). $('element').bindOnce();
D). $('element').on('once', function() {...});
How to bind a mouseover event handler to all<div>
elements using jQuery?
A). $('div').on('mouseover', function() {...});
B). $('div').addEventListener('mouseover', function() {...});
C). $('div').bind('mouseover', function() {...});
D). $('div').mouseover(function() {...});
How to bind a change event handler to all<select>
elements using jQuery?
A). $('select').on('change', function() {...});
B). $('select').addEventListener('change', function() {...});
C). $('select').bind('change', function() {...});
D). $('select').change(function() {...});