How to update component when button is clicked

I think this post is pretty similar to this thread: Which component triggered the callback

Its an effective way to figure out what button or any other component has changed, and update another component based on which one was triggered. It uses hidden divs to store the timestamps of when each component was called, and compares to the current time to figure out which one was called last - similar to nahal626 and Harold’s suggestions. This referenced link may be useful since its all written out.