Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
Event delegation works by attaching a single event listener to a parent element to catch events bubbling up from the children. Many people believe this is more performant than attaching event listeners to each child. I am not convinced this is always true.
Let's start with a common example of event delegation. Here we have a list of elements:
<ul id="item-list">
<li data-cost="12">Item 1</li>
<li data-cost="18">Item 2</li>
<li data-cost="6">Item 3</li>
...