I'm working on an addClass method for my final project. I checked everything to make sure that there are no typos but clicking on the button doesn't change the texts color.
Here is my code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Final Project: Home</title>
<style type="text/css">
.theColor {
color: white;
}
</style>
</head>
<body>
<script src="jquery-2.1.3.js"></script>
<script src="script.js"></script>
<p><input id="theButton" type="button" value="Add Class!" /></p>
<h4 id="theText">Some Text</h4>
</body>
</html>
and here is my jQuery code:
$('#theButton').click(function(){
$('#theText').addClass('theColor');
});