Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assignment Submission #140

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ assignment_jq_dom_sprint
========================

...that DOM, D-DOM DOM DOOOOM...
Jacob Farenci
35 changes: 35 additions & 0 deletions document.ready.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
$(document).ready(function(){

//Set H1 text to "Something Cheeky"
$('h1').text("Something Cheeky");

//Insert an HTML element to our div element with the class info-box
$('div.info-box').append("<ol><li>one</li><li>two</li><li>three</li></ol>");

//Change the class of "sad" elements to "happy"
$('.sad').addClass("happy");
$('.happy').removeClass("sad");

//Change the attribute of the pop up's href link to a different url
$('#annoying-popup a').attr('href', 'http://www.cashcats.biz');

//Change the position of the pop-up with CSS styling
$('#annoying-popup').css({
'right': '0px',
'top': '30px'
});

//Set our $list variable as our list we want so we can refer to it's cells
var $list = $('.suggested-topics ul').children();
//check each cell's inner HTML and then change it if it is "..."
for ( i = 0; i < $list.length; i++ ) {
if( $list[i].innerHTML == "..." ) {
$list[i].innerHTML = "sample text";
}}

//Add in a textarea and remove the text input
$('.input-form input[type="text"]').remove();
$('.input-form').html("<textarea></textarea>" + $('.input-form').html());


});
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<!doctype html>
<html>
<head>
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="jquery-3.2.1.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
<script type="text/javascript" src="scripts.js"></script>
<script type="text/javascript" src="document.ready.js"></script>
</head>
<body>
<header>
Expand Down Expand Up @@ -55,4 +57,4 @@ <h3>

</body>

</html>
</html>
4 changes: 4 additions & 0 deletions jquery-3.2.1.js

Large diffs are not rendered by default.