I have got a list of elements that im trying to delete using the .remove() from jQuery.It does delete the elements while viewing the page on the browser but I was wondering if its possible to delete the elements in its entirety from the page? So when i open the file in an editor later on, those elements shouldn't appear.
And one thing I have noticed that was even though the .remove() deletes the elements, the deleted elements comes back once i refresh the page. Would some be kind enough to give an explanation for this ?
I have posted below the code i've written :-
HTML:
<ul class="listServices">
<li class="date">03rd October Sunday </li>
<li class="subject">maths</li>
<li class="subject">english</li>
<li class="subject">physics</li>
</ul>
<div class="btn">delete</div>
Jquery:
$(document).ready(function() {
$('.btn').click(function () {
$curr = $(this).prev();
$curr.remove();
});
});