Created
March 29, 2014 22:10
-
-
Save nextechu/9863861 to your computer and use it in GitHub Desktop.
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> | |
<title></title> | |
</head> | |
<body> | |
<div> | |
<div id="div1">My div with id attribute of div1</div> | |
<div class="required">Here is the second message</div> | |
<span>Here is the third message</span> | |
</div> | |
<script src="Scripts/jquery-2.1.0.js"></script> | |
<script> | |
$(document).ready(function () { | |
// we'll put our code here | |
alert('page ready'); | |
// Id selector | |
$("#div1").css("backgroundColor", "pink"); | |
// Class selector | |
$(".required").css("border", "dashed 2px red"); | |
// Element selector | |
$("span").css("color", "purple"); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment