0

I have a test form on a SharePoint site provided with some JavaScript code which shows how to disable and grey out sections in a form. I am trying to remove the 'x' in the people picker section using the following code:

    //hide x image
    $(".sp-peoplepicker-delImage").hide();

Currently this code works perfectly fine in Internet Explorer/Edge as can be seen in the following screenshot:

Code works in IE

It does not remove it in chrome though, as can be seen below:

Code does not work in chrome/firefox

Is there a fix for this?

0

Try with css() instead.

$(".sp-peoplepicker-delImage").css('display','none');
  • I tried your suggestion and that didn't seem to work, I also tried tried using: ('visibility', 'hidden') and this didnt work either – shalorsar Mar 27 at 1:42
  • Are you setting the field programmatically? If possible, add the rest of your code or debug using F12 console! – Christoffer Mar 27 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.