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="wrap"></div>
</body>
</html>
 
.wrap span {
  display: block;
}
 
var $span1 = $('<span class="span"></span>');
var $span2 = $('<span class="span"></span>');
console.log($span1.css('display'));
console.log($span2.css('display'));
// DOM에 붙기 전에 show() 호출
$span2.show();
$span1.appendTo('.wrap');
$span2.appendTo('.wrap');
console.log("span1 display: ", $span1.css('display'));
console.log("span2 display: ", $span2.css('display'));
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers