i have a css class with a ::after selector , and when a user click on the element that have this class i want to show an alert. but i don't know why its not working .
this is my code :
css :
.flatpickr-time.time24hr :first-child:after {
content: 'Valider';
background: #BB0A30;
font-family: 'audditype-bold';
font-size: 15px;
color: white;
padding: 8px 50px 8px 50px;
left: 28px;
position: absolute;
top: 60px;
}
js:
$('.flatpickr-time.time24hr :first-child:after').click(function(){
alert('hello test')
});
so the purpose here is to show an alert when clicking on the content 'valider'