Hello I would like to remove a pseudo :after
element when an input field is clicked. I know that I should use :focus
but some reason I cant get it to work.
Here is the HTML:
<li id="field_1_1">
<div class="ginput_container">
<input name="input_1" id="input_1_1" type="text">
::after
</div>
</li>
The :after
element is caused by this css:
#field_1_1 .ginput_container_text:after {
content: "\25CF";
position: absolute;
}
My goal is to remove this :after
element when a user clicks on the input field. I have tried CSS and jQuery and I couldn't get either to work.
Here is what I tried using CSS:
#footer-form #input_1_1:focus #field_1_1 .ginput_container_text:after {
display: none;
}
And here is what I tried using jQuery:
jQuery("#field_1_1").click(function(){
jQuery("#field_1_1 .ginput_container_text:after").remove();
});
Does anyone have any suggestions?
Thanks