jQuery that works in Firefox but not in IE
<p>Ok guys/girls.</p>

<p>Below is some jQuery that runs in Firefox but no IE. I have no idea why it craps out in one and not the other. </p>

<p>Anyone??</p>

<pre><code>function SwapTextAssetforPOS() {

    $("*").each(function () {

        if ($(this).children().length == 0) {

            $(this).text($(this).text().replace('Assets', 'POS'));
            $(this).text($(this).text().replace('Asset', 'POS'));
            $(this).text($(this).text().replace('assets', 'POS'));
            $(this).text($(this).text().replace('asset', 'POS'));

        }

    });

}
</code></pre>

<p>Sorry folks - the error that I get is:-</p>

<p><strong>SCRIPT65535: Unexpected call to method or property access. 
jquery-1.6.min.js, line 16 character 60352</strong></p>

<p><strong>EDIT:------------------------------------------------------------------------------------</strong></p>

<p>Ok so an update - I removed the * selector and IE no longer blows up, my issue now is that I cant figure how to get it to do the replace on the element. I have the following code to ping up all the text elements in the object:</p>

<pre><code>function SwapTextAssetforPOS() {
        var containerElementByID = $("#assetDetailContents");

        containerElementByID.children().children().each(function () {
            var $this = $(this);

            alert($this.text());


        });
</code></pre>

<p>This chucks me up an alert for every bit of text, however some is contained within a table, some is within a span, and some is just there. I have no control over a majority of this stuff so my new question is how do I get the previous replace to work using this type of selector. -- I can believe how painful this is..</p>

<p>Cheers again</p>
