Here’s a link to my pen - https://codepen.io/sk1995/pen/YYEbYz
So, imagine I write something in the input field, i press enter or press search to search for the wiki articles. The articles appear, all good. Afterwards, If you hover over the input field, you can see an X sign at the right corner of the input field. If you press it, it deletes whatever there was in the input field, but if it is pressed, the searched for articles remain on the page.
I know how to empty the div that is full of the found articles. What I need to do is attach an action to it. When I press X, i want not only for the text in the input field to disappear, but I also want to empty the div that contains the found articles. To do that, I need to know how to name the action of clicking the X mark.
I guess my question probably wasn’t written well enough before.