if element is clicked do this javascript code example
Example 1: how to check if you click something in javascript
// get the element
const element = document.getElementById('profile_title')
// always checking if the element is clicked, if so, do alert('hello')
element.addEventListener("click", () => {
alert('hello');
});
Example 2: how to detect clicks with javascript
element.addEventListener('click', function () {
alert('Clicked!')
});