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

JQDom Sprint #122

Open
wants to merge 3 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
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<html>
<head>
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="jqfile.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
<title> JQ Ex </title>
</head>
<body>
<header>
Expand Down Expand Up @@ -55,4 +57,4 @@ <h3>

</body>

</html>
</html>
44 changes: 44 additions & 0 deletions jqfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

$(document).ready(function() {

$('h1').css("color", "blue");


var tsList = "<ol></ol>";

var myLoop = ["Rome", "London" , "Paris"];
$("h4").after(tsList);
var $myOl = $("ol");
for(var i=0; i < myLoop.length; i++)
{
$myOl.append("<li>" + myLoop[i] + "</li>");

}

$myOl.css("");




$(".sad").toggleClass("sad happy");

$("#annoying-popup").html('<a href="http://www.cashcats.biz" >http://www.cashcats.biz</a>');

$("#annoying-popup").css("top", "30px");
$("#annoying-popup").css("position" , "relative");
$("#annoying-popup").css("float" , "right");
$("h1").before( $("#annoying-popup"));


var $newLi = $('<li>--</li>');
var $oldLi = $('li') [9];
$($oldLi).replaceWith($newLi);



var textArea = "<textarea />";
var $inputText = $(':input[type=text]');
$inputText.replaceWith(textArea);


});
8 changes: 7 additions & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ main{
form{
text-align: center;
}
ol{
width: 200px;
margin: auto;

}

.happy{
color: green;
}
Expand Down Expand Up @@ -41,4 +47,4 @@ form{
}
#annoying-popup a{
color: white;
}
}