Commit a6b0b0ed authored by Matthew Burket's avatar Matthew Burket
Browse files

Events now work

parent 4f6605ae
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="code.js" type="text/javascript"></script>
<title>Code</title>
</head>
......@@ -18,5 +18,11 @@
<button>Hi</button>
<br />
<a href="https://google.com" target="_blank">Google</a>
<select id="hi">
<option value="option1" selected="selected">1</option>
<option value="option2">2</option>
</select>
<input type="text" id="inputThingy" />
<p id="talkBack1"></p>
</body>
</html>
\ No newline at end of file
......@@ -8,4 +8,30 @@ jQuery(function() {
$("p").css('font-size', '20px');
$("button").css('height', '20px');
$("a").css('text-decoration', 'none');
var superCoolCounterThingy = 0;
$("#hi").change(function() {
$("#inputThingy").attr('value', 'The p tag changed! ' + superCoolCounterThingy);
superCoolCounterThingy++;
});
$("h1").click(function() {
$("h1").hide();
alert("I'm gone!");
});
$("p").hover(function() {
$("p").css('color', 'green');
});
$("p").mouseleave(function() {
$("p").css('color', 'white');
});
$("#inputThingy").blur(function() {
$("#inputThingy").attr('value', 'Yo text is gone.');
});
});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment