Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<title>Sandbox</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
body { background-color: #000; font: 16px Helvetica, Arial; color: #fff; }
  .speaker{
    background-color:  green;
  }
  .hightlight2{
    background-color: green;
  }
  </style>
</head>
<body>
   <table id="BodyContentid">
        <tr>
            <td class='speakerTotheTop'><span class="speaker">Paula:</span></td>
            <td>
                <p>
                 <b> ay, 
                   Today, and <i>Tomorrow.</i>\" Today's guests are 
            high school students Jason and Rachel. 
                   You know</b> the rules, so let's begin. Jason, 
            by the time your children learn to drive, cars will probably be running 
            on what kind of energy?
                </p>
            </td>
        </tr>
        <tr>
            <td class="speakerTotheTop"><span class="speaker">Jason:</span></td>
            <td>
                <p>Solar. </p>
            </td>
        </tr>
        <tr>
            <td class="speakerTotheTop"><span class="speaker">Paula:</span></td>
            <td>
                <p>
                    Right! Now, Rachel, which country in the world 
            has the largest population?
                </p>
            </td>
        </tr>
        <tr>
            <td class="speakerTotheTop"><span class="speaker">Rachel:</span></td>
            <td>
                <p>China.</p>
            </td>
        </tr>
        <tr>
            <td class="speakerTotheTop"><span class="speaker">Paula:</span></td>
            <td>
                <p>
                    Correct. Next question. 
            What technique is expected to be used more in surgery to significantly 
            improve its efficiency?
                </p>
            </td>
        </tr>
        <tr>
            <td class="speakerTotheTop"><span class="speaker">Jason:</span></td>
            <td>
                <p>Experiments on animals? </p>
            </td>
        </tr>
        <tr>
            <td class="speakerTotheTop"><span class="speaker">Paula:</span></td>
            <td>
                <p>No, Jason. Rachel? </p>
            </td>
        </tr>
        <tr>
            <td class="speakerTotheTop"><span class="speaker">Rachel:</span></td>
            <td>
                <p>Lasers. </p>
            </td>
        </tr>
        <tr>
            <td class="speakerTotheTop"><span class="speaker">Paula:</span></td>
            <td>
                <p>
                    Right. Rachel, your turn. 
            Now that we have already been to the moon, we might soon be living in 
            outer space. Name the planet closest to 
            Earth.
                </p>
            </td>
        </tr>
        <tr>
            <td class="speakerTotheTop"><span class="speaker">Rachel:</span></td>
            <td>
                <p>Mars. </p>
            </td>
        </tr>
        <tr>
            <td class="speakerTotheTop"><span class="speaker">Paula:</span></td>
            <td>
                <p>
                    Correct, again! 
            The first person to answer the next question will get twenty-five points. 
            In what way can we drastically limit the amount of garbage that we throw 
            away?
                </p>
            </td>
        </tr>
        <tr>
            <td class="speakerTotheTop"><span class="speaker">Jason:</span></td>
            <td>
                <p>
                    By recycling it, so that it can be used again.
                </p>
            </td>
        </tr>
        <tr>
            <td class="speakerTotheTop"><span class="speaker">Paula:</span></td>
            <td>
                <p>
                    Right, Jason. Twenty-five points to you. 
                  I'm afraid that's<b> all we have time for. </b>
            Rachel is today's winner. I'm Paula Turner, 
            wishing all of you a good week. Join us 
            again next week for \"Yesterday, Today, and Tomorrow.\"
                </p>
            </td>
        </tr>
    </table>
   
</body>
</html>
 
(function($) {
$.fn.tagRemover = function() {
  return this.each(function() {
    var $this = $(this);
    var text = $this.text();
    $this.replaceWith(text);
  });
};
})(jQuery);
$('td.speakerTotheTop').tagRemover();
//$('i').tagRemover();
$('b').contents().unwrap("i");
var emptyAnchors = document.querySelectorAll('td .speaker');
//var emptyAnchors = document.getElementById ("speaker");
// var emptyAnchors = document.getElementsByClassName("speaker");
            for (var i = 0; i < emptyAnchors.length; i++) {
                
            //    var element = emptyAnchors[i];
            element.parentNode.insertBefore(element.firstChild, element);
            element.parentNode.removeChild(element);
            }
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers