Remove a collection Item when it equals a certain string

Hi, I want to remove a certain collection item when it equals CRNA but this line never becomes true and it never triggers the hide action inside is there anything missing from this code?

image

<script>
$(".job-search_item").each(function (index) {
  if ($(this).find(".card-link-specialty").text() === "CRNA") {
    $(this).find(".card-link-specialty").hide();
  }
});
</script>

Here is my site Read-Only: Webflow - Health Carousel Locum Tenens

Please follow the posting guidelines for this forum category.

Most likely it’s executing before the DOM is loaded.
Use jQuery’s on ready;

$(function() {
   ... your code here .. 
});

Make sure it’s in the </body> custom code area as well, so jQuery is loaded. I didn’t check.

thanks, that part does work but it just wont go inside this part
if ($(this).find(".card-link-specialty").text() === "CRNA")

You have a script error that’s terminating execution, probably before the point your desired code will run.

thanks! I’ll let the team know as I’m not familiar with the other code causing the issue.