Commit 3aec7c8d authored by Matthew Burket's avatar Matthew Burket
Browse files

Add more things for code.js

parent a6b0b0ed
......@@ -15,14 +15,15 @@
sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</p>
<p>Hello World</p>
<button>Hi</button>
<br />
<button>Toogle Images</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" />
<input type="text" id="inputThingy"/>
<p id="talkBack1"></p>
<img src="http://alishadcarter.files.wordpress.com/2013/02/iowa-state.jpg" />
</body>
</html>
\ No newline at end of file
......@@ -2,7 +2,8 @@
* Created by matthewburket on 2/22/16.
*/
jQuery(function() {
jQuery(function () {
// CSS
$("body").css('background', 'green');
$("h1").css('color', 'white');
$("p").css('font-size', '20px');
......@@ -10,26 +11,32 @@ jQuery(function() {
$("a").css('text-decoration', 'none');
// Effects
$('button').click(function(){
$( "img" ).toggle();
});
// Events
var superCoolCounterThingy = 0;
$("#hi").change(function() {
$("#hi").change(function () {
$("#inputThingy").attr('value', 'The p tag changed! ' + superCoolCounterThingy);
superCoolCounterThingy++;
});
$("h1").click(function() {
$("h1").click(function () {
$("h1").hide();
alert("I'm gone!");
});
$("p").hover(function() {
$("p").css('color', 'green');
});
$("p").hover(function () {
$("p").hide('fade');
});
$("p").mouseleave(function() {
$("p").css('color', 'white');
$("p").mouseleave(function () {
$('p').show('fade');
});
$("#inputThingy").blur(function() {
$("#inputThingy").blur(function () {
$("#inputThingy").attr('value', 'Yo text is gone.');
});
......
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