From 7b92ce60a8540e8a66387e8884b2973f4dfa2793 Mon Sep 17 00:00:00 2001 From: Laura Balis Date: Tue, 28 Feb 2017 17:49:02 -0700 Subject: [PATCH] Initial commit; assignment not complete yet --- boxes.js | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/boxes.js b/boxes.js index 6b2b3db..1a1fa03 100644 --- a/boxes.js +++ b/boxes.js @@ -1 +1,33 @@ -console.log("hello world"); +$(document).ready(function() { + + //EXERCISE 1 + + alert("Ready for DOM manipulation"); + + //EXERCISE 2 + + $("#secretBox").css("background-color", "white"); + $("#secretBox").html("

secret box!

"); + + $("#row1").children().addClass("boxType3"); + + $("#row4").children().eq(3).css("display", "none"); + + $(".boxType1").css("background", "white"); + + $("#row2").children().slice(0,2).attr("class", "box"); + + $("div").not(".row #secretBox").css("width", "2px"); + + //EXERCISE 3 + + $("#container").click(function(event) { + console.log(event.pageX + " , " + event.pageY); + }); + +}); + +//ALTERNATE CALLBACK METHOD +// $(function() { +// alert("Ready for DOM manipulation"); +// });