I'm working with a third-party code and I'm quite limited in terms of filtering a list of elements.
Each of these elements has this structure:
<div class="item-preview">
<div class="item-info">
<div class="tag">
<svg class="tag-public"></svg>
</div>
</div>
</div>
The only thing that changes is the svg class, so it's whether tag-public or tag-private. Depending on the user type that's checking the content, I'd like to hide it when it's tag-private. Something like:
if user == x_member_type
if item-preview CONTAINS tag-private
HIDE item-preview
Is there any way possible to target that parent div so I can work with that? I've tried with jQuery's parent, closest, etc. but I'm not getting any results.
For whatever reason, it is not working. I guess it's getting the list of elements via AJAX and displaying it and my added jQuery doesn't make any difference.
Do you have any ideas about what might be going on?