Hide after-pseudo-element from all Labels but only for password-fields

Hide after-pseudo-element from all Labels but only for password-fields

Hi,

I need to hide the pseudo-element AFTER for all labels which belongs to an input field with a type of password.

The markup is:

  1. <label for="edit-pass">Password</label>
  2. <input class="form-control form-text required error" type="password" id="edit-pass">

To do this I wrote this line of code:

  1. $(':password').prev('label::after').hide();

However it doesn't work.

I created a PEN for it:


Any help?

Thanks