Add click event function to folium markers with Python

I have made an html file that consists of a folium map with several markers on the right half of the screen. On the left half of the screen I have an html container consisting of several items, where each item is a description and several images.

Each item corresponds to a location of a marker, e.g. One marker is located on Bangkok and in the html container I have a corresponding story and images. I want to add a click event to each marker, such that when you click on a marker, the left side automatically scrolls down to the text/images corresponding to said marker (see image below).

Example layout

I have found a similar issue in this thread below, but I have no clue how to adjust the function onClick(e) to suit my needs.
Show path in folium map by clicking or hovering marker

Thanks in advance!