I hide a <li style="display:none">
but clicking on inspect in a browser allows me to see its contents. I want that content not to be displayed when I click on inspect.
I hide a <li style="display:none">
but clicking on inspect in a browser allows me to see its contents. I want that content not to be displayed when I click on inspect.
For this you could use Jquery with the function: remove
My html:
<ul>
<li class="list">Rusia</li>
<li class="list">Mexico</li>
<li class="list">España</li>
</ul>
Removing the li:
$('.list').each(function(){
$(this).remove()
});
This eliminates the li completely without being seen by the browser inspector.
Note .- In this case I use a css class called list to identify and delete them .. adapt this code to your needs by id, class, tag ..
I hope I help you!