- CSS and XPath are both acceptable answers.
children()for immediate descendants and
find()for any elements in the descendant hierarchy
- You can use the
on('mouseover')method. If you use deprecated methods, in addition, you can use
Extra Credit: Use the
event.targetproperty is used to check to see which descendant element has received the event. The event then bubbles up from that element to the element that the event handler is attached to.
- Provide a selector argument to the
on()method describing the element you want the event to apply to on the parent or container element that contains the elements you want the event to apply to. This can also be the
- Naming an instance of an event handler can be done by applying the event name, a dot, and then the namespace you want to use. You can apply multiple event names by repeating the same process.
- You can use either
click()with no arguments or
trigger()method can be used to fire the custom event handler, as well as to send custom data to the event handler.
- One possibility: ...