Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  
  <div>
    
    <b>unwrap method is causing ready function to fire twice.</b>
    <ul></ul>
 
    <div id="__patient">     
      <script type="text/javascript">
          
        
          $(function () {                
            $('<li>fired '+ ( window.loaded ? 'twice' : 'once') +'</li>').appendTo('ul');
            window.loaded = true;
          });
      </script>      
    </div>
    
    <script type="text/javascript">
      
         $('#__patient').unwrap();
      
    </script>
    
  </div>
 
  
  
</body>
</html>
 
if (document.getElementById('hello')) {
  document.getElementById('hello').innerHTML = 'Hello World - this was inserted using JavaScript';
}
Output 300px

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

Dismiss x
public
Bin info
nmyvisionpro
0viewers