jQuery does not overwrite events, but adds to them. So, if you did this:
$(document).ready(function() {
$("#test").click(function () { $(this).append("test<br />"); });
$("#test").click(function () { $(this).append("test 2<br />"); });
});
with a div similar to:
<div id="test">click me <br /></div>
When you click on a div, it simultaneously adds “test” and “test 2”.
source
share