From 4f92b7c170795a3f9f6c778cf0848e6748a19ece Mon Sep 17 00:00:00 2001 From: Tim Pender Date: Tue, 7 Jun 2016 15:30:19 -0600 Subject: [PATCH] assignment complete. Access by uncommenting on the js file --- boxes.html | 5 +++++ boxes.js | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/boxes.html b/boxes.html index 44586a8..3b8d08e 100644 --- a/boxes.html +++ b/boxes.html @@ -32,7 +32,12 @@
+ + + diff --git a/boxes.js b/boxes.js index 6b2b3db..1469350 100644 --- a/boxes.js +++ b/boxes.js @@ -1 +1,53 @@ -console.log("hello world"); +$( document ).ready(function() { + + +// // Exercise #2 - Commented Out for Events in Exercise #3 + // $(document).find('#secretBox').css('background-color', 'white'); + // $(document).find('#secretBox').html('

Secret box!

'); + // + // $('#row1').children().attr('class', 'boxType3'); + // + // $('#row4 div:last-child').css('display', 'none'); + // + // $('.boxType1').css('background-color', "white"); + // + // $('#row2 div:nth-child(-n+2)').attr('class', ''); + // + // + // $("#container div").not('.row').not('#secretBox').css('width', '2px'); + +//Exercise #3 - + // + // $('#container').on('click', function(event){ + // console.log(event.pageX, event.pageY); + // }) + // + $('.boxType1').not('#secretBox').html('ClickHere!'); + + $('.boxType1 a').on('click', function(event){ + alert('HAHAHA you can never leave this page ever!'); + event.preventDefault(); + }); + +// $('.box').append(''); +// $('.togglePup').css('max-height', '100%'); +// $(".togglePup").hide(); +// +// $(".box").on('click', function(){ +// $(this).children().toggle(); +// }); + // + // $("#container").on('click', function(e){ + // if (e.target.id === 'container') { + // $(this).css('background-color', "lightgreen"); + // } else { + // console.log(e.target); + // console.log('^^^'); + // $(e.target).css('background-color', 'white'); + // $('#container').css('background-color', 'black'); + // } + // + // }) + + +});