views:

17

answers:

0

Hi.. I am stuck with a problem, which has got to do with Apostrophe's. How do i find and replace all apostrophe's with some other character. The code is as follows.

Script

jQuery('.note').each(function() {

        var final = jQuery(this).text();
        jQuery(this).html('<div class="solutionnotes">'+final+'</div>');

         var htmlElement = jQuery('.solutionnotes').text();
         var e = htmlElement;
         alert(e);
         e.replace(/\&amp;apos;/g, "acute;");
    });

HTML Code

<body>
<div class="note">&amp;apos; &amp;apos; &amp;apos; Test 1 &amp;apos; &amp;apos;</div>
<div class="note">&amp;apos; &amp;apos; &amp;apos; Test 1 &amp;apos; &amp;apos;</div>
<div class="note">&amp;apos; &amp;apos; &amp;apos; Test 1 &amp;apos; &amp;apos;</div>
</body>