Created
May 24, 2015 08:04
-
-
Save anonymous/a6ae45373fa08489e1f3 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/xoriredijo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.wrapper { | |
background-color: rgba(1, 1, 1, 0.01); | |
border: 1px solid rgba(1, 1, 1, 0.02); | |
padding: 4px; | |
margin: 4px; | |
} | |
.wrapped { | |
background-color: pink; | |
border: 1px solid rgba(1, 1, 1, 0.2); | |
padding: 4px; | |
margin: 4px; | |
} | |
</style> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
var es, w; | |
w = $('<div>').addClass('wrapper'); | |
es = [1, 2, 3].map((function(_this) { | |
return function(_) { | |
return $('<div>').addClass('wrapped'); | |
}; | |
})(this)); | |
$("body").append(es); | |
$(".wrapped").wrapAll($('<hr class="wrapper">')); | |
console.log(es.length); | |
</script> | |
<script id="jsbin-source-css" type="text/css">.wrapper { | |
background-color: rgba(1,1,1,.01); | |
border: 1px solid rgba(1,1,1,.02); | |
padding: 4px; | |
margin: 4px; | |
} | |
.wrapped { | |
background-color: pink; | |
border: 1px solid rgba(1,1,1,.2); | |
padding: 4px; | |
margin: 4px; | |
}</script> | |
<script id="jsbin-source-javascript" type="text/javascript">w = $ '<div>' | |
.addClass 'wrapper' | |
es = [1,2,3].map (_) => | |
$ '<div>' | |
.addClass 'wrapped' | |
$ "body" | |
.append es | |
#$(".wrapped").wrapAll w | |
$(".wrapped").wrapAll $ '<hr class="wrapper">' | |
console.log es.length</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wrapper { | |
background-color: rgba(1, 1, 1, 0.01); | |
border: 1px solid rgba(1, 1, 1, 0.02); | |
padding: 4px; | |
margin: 4px; | |
} | |
.wrapped { | |
background-color: pink; | |
border: 1px solid rgba(1, 1, 1, 0.2); | |
padding: 4px; | |
margin: 4px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var es, w; | |
w = $('<div>').addClass('wrapper'); | |
es = [1, 2, 3].map((function(_this) { | |
return function(_) { | |
return $('<div>').addClass('wrapped'); | |
}; | |
})(this)); | |
$("body").append(es); | |
$(".wrapped").wrapAll($('<hr class="wrapper">')); | |
console.log(es.length); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment