Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div class="foo">I am foo
    <p>Weee</p>
    <style> body { color: red; } </style>
  </div>
  <div id="output"></div>
</body>
</html>
 
var $foo = $('.foo'),
    $fooClone = $foo.clone();
$fooClone.find('style').remove();
$('#output').html($fooClone.text());
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers