- Explain what the jQuery Event API is.
- Explain why the jQuery Event API is important.
- Use the jQuery Event API to respond to user interaction.
- Use the jQuery Event API to delegate events.
Turn to your neighbor and explain what the JQuery Event API is. Also, write down on your table the code
to add a click event listener to the li elements below, then print the content of the clicked li.
<ul>
<li>Milk</li>
<li>Cheese</li>
<li>Banana</li>
<li>Eggs</li>
</ul>Turn to your neighbor and explain to each other why the JQuery Event API is important. Be prepared to share your answer with the class.
- With your neighbor create a example that adds a
mouseenterevent to an element, and then removes the event. - How do you remove all events on an HTMLelement?
- With your neighbor create an JQuery event handler to capture if the
Shiftkeys has been pressed. - What event is triggered when you submit a form?
- Turn to your neighbor and explain what is event delegation is. Be prepared to share your discussion.
- With your neighbor, refactor the example above using event delegation.