add border to elements with events