How do I hide the list item with
iconsrc="/_layouts/15/images/delitem.gif"
image when this div is injected by a first party and I am a third party trying to conceal it?
$("<style> what should be inserted here ???? { display: none; } </style>").appendTo(document.documentElement);
What is the best way to target the list item with
iconsrc="/_layouts/15/images/delitem.gif"
in the document?
<div class="ms-core-menu-box ms-core-menu-hasIcons ms-core-defaultFont ms-shadow" title="" dir="ltr" contenteditable="false" style="top: 0px; position: absolute; visibility: visible; left: -129px; width: 127px;" flipped="false">
<ul class="ms-core-menu-list">
<li type="option" text="Delete" onmenuclick="spgridcontainer_WPQ2_rowcontextmenu_onclick(0);" iconsrc="/_layouts/15/images/delitem.gif" iconalttext="Delete" enabled="true" checked="undefined" id="mp43_0_0" class="ms-core-menu-item">
<a class="ms-core-menu-link" id="mp43_0_0_Anchor" href="javascript:;" onclick="return false;" title="Delete">
<div class="ms-core-menu-icon">
<img src="/_layouts/15/images/delitem.gif" alt="Delete" title="Delete" id="mp43_0_0_ICON">
</div>
<div class="ms-core-menu-label" id="">
<span class="ms-core-menu-title">Delete</span>
<span></span>
</div>
<span class="ms-accessible"></span>
<div></div>
</a>
</li>
</ul>
</div>
The objective is to ensure the delete button remains hidden whenever this list is injected into the page.