Skip to content

Instantly share code, notes, and snippets.

@arod2634
Created March 28, 2014 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arod2634/9825459 to your computer and use it in GitHub Desktop.
Save arod2634/9825459 to your computer and use it in GitHub Desktop.
A Pen by Alex Rodriguez.
<!-- We can remove the doctype since Codepen sets it up automatically for us -->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Element Demo</title>
<!-- Lets move this into a separate stylesheet -->
<style>
div, span {
width: 60px;
height: 60px;
float: left;
padding: 10px;
margin: 10px;
background-color: #eee;
}
</style>
<!-- We can remove this also since Codepen sets it up automatically for us -->
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<h1></h1>
<div>DIV1</div>
<div>DIV2</div>
<span class="message"></span>
<!-- Lets move this to a separate JS file -->
<script>
jQuery(document).ready(function(){
$( "h1" ).text("Hello World!");
$( ".message" ).text("I'm a span!");
$( "div" ).css( "border", "9px solid red" );
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment