diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..068de1e Binary files /dev/null and b/.DS_Store differ diff --git a/boxes.js b/boxes.js index 6b2b3db..33c71dc 100644 --- a/boxes.js +++ b/boxes.js @@ -1 +1,44 @@ console.log("hello world"); +$(document).ready(function(){ + $('#secretBox').css('background-color','white'); + $('#secretBox').append('

Secret Box!

'); + + $('#row1').children().addClass('boxType3'); + $('#row4').children().last().hide(); + + $('.row').children().filter('.boxType1').css('background-color','white'); + + for(var i = 0; i < 2; i++){ + $('#row2').children().eq(i).removeClass('boxType2 boxType3'); + } + +/* + $('.row').children().not('#secretBox, .row').css('width', '2px'); +*/ + + + $('#container').click(function(){ + var x = event.pageX; + var y = event.pageY; + console.log('[' + x +',' + y + ']'); + }); + + $('.row').children().filter('.boxType1').append('Galvanize'); + + $('.row').children().click(function(){ + $(this).toggleClass('img'); + }); + + + $('#container').click(function(){ + $('#container').css('background-color','lime'); + }); + + $('#container').children().click(function(){ + + $('#container').css('background-color','black'); + event.stopPropagation(); + }); + + +}); diff --git a/cute.jpg b/cute.jpg new file mode 100644 index 0000000..059af7f Binary files /dev/null and b/cute.jpg differ diff --git a/style.css b/style.css index bfbe511..bd28fab 100644 --- a/style.css +++ b/style.css @@ -41,3 +41,9 @@ .boxType3 { background: blue; } + +.img{ + background-image : url(cute.jpg); + background-size' : contain; + background-repeat : no-repeat; +}