Jquery remove text from span

后端 未结 3 694
[愿得一人]
[愿得一人] 2021-02-04 15:31

I\'m new to JQuery and really struggling how to perform the query I want.

I\'m using SharePoint, and the when using the External Data Column and set it to required field

3条回答
  •  长情又很酷
    2021-02-04 15:59

    Here's more optimised and faster approach:

    $(".ms-usereditor span[class^='ms-error']:contains('External Data')").hide()
    

    And additionally, this syntax works as a charm when you require a sort of regex pattern to find all matching nodes or nodes with similar classnames. Suppose, you need to find something .ms-error-1 .ms-error-abc. So, same syntax works and even better you could do like this:

    $(".ms-usereditor span[class^='ms-error-']:contains('External Data')").hide()
    

提交回复
热议问题