I am trying to use JQuery to search and replace all instances of a given string. JQuery was the only method I found which doesn't force-reload the whole page. This is what I have right now:
<script>
$("*").each(function () {
if ($(this).children().length == 0) {
$(this).html($(this).html().replace('0101','0102'));
}
});
</script>
Right now, this replaces most instances of 0101 with 0102 on the page, but it does not replace instances within href links. Does anyone know why? I really need this to find/replace the whole document, through and through.