I am working on a web application, and i want to remove all the <a>
that have the word "question". so i write the following script:-
<script>
$( document ).ready(function() {
$('a.ms-pivotControl-surfacedOpt:contains("question")').hide();
});
</script>
Now i got this behavioure:-
when the page first loads, the script will be able to hide all the content correctly.
but if i click on a button that will refresh the page in an Ajax-Based approach, then the content that have "Questions" inside it will be shown (the script will not have any effect).
so i think the problem is that the script will not be able to understand the newly added content. i remember on old jquery versions i use to define .Live()
to keep my script live and to understand newly added content ,, so is this possible inside my above script ?