Skip to content
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
69 changes: 69 additions & 0 deletions Uma/Color_Clicker.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<html>
<head>
<title>The Codingdojo ColorClicker!</title>
<script type="text/javascript" src='http://code.jquery.com/jquery-1.10.2.min.js'></script>
<script type="text/javascript">
function random_color()
{
var rgb = ['a','b','c','d','e','f','0','1','2','3','4','5','6','7','8','9'];
color = '#' //this is what we'll return!
for(var i = 0; i < 6; i++)
{
x = Math.floor((Math.random()*16))
color += rgb[x];
}
return color;
}
$(document).ready(function(){
$('#large_box').click(function(){
$(this).css("background-color", random_color());
$(this).children().css("background-color", random_color());
});
$('.side_box').click(function(event){
var color = random_color();
$("#large_box>div").not(this).css("background-color", color);
event.stopPropagation();
});
$('.middle_box').click(function(event){
var color = random_color();
$('#large_box').css("background-color", color);
event.stopPropagation();
});
});
</script>
<style type="text/css">
*{
font-family: sans-serif;
}
h2, h1, h3 {
text-align: center;
}
#large_box {
margin: 0px auto;
margin-top: 30px;
background-color: lightblue;
width: 1200px;
height: 300px;
}
#large_box div {
background-color: blue;
display: inline-block;
width: 350px;
height: 130px;
margin: 60px 20px;
}
</style>
</head>
<body>
<h1>The Codingdojo ColorClicker! </h1>
<div id='large_box'>
<div class='side_box'></div>
<div class='middle_box'></div>
<div class='side_box'></div>
</div>
<h2>Rules</h2>
<h3>1. Clicking the big box should change background colors of both the small and large boxes!</h3>
<h3>2. Clicking the middle small box should change the color of the big box!</h3>
<h3>3. Clicking the left or right small box should change the color of that box's siblings</h3>
</body>
</html>
Empty file added Uma/ContactCard/ContactCard.css
Empty file.
24 changes: 24 additions & 0 deletions Uma/ContactCard/ContactCard.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<title>Contact Card App</title>
<link rel="stylesheet" type="text/css" href="ContactCard.css">
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="ContactCard.js"></script>
</head>
<body>
<div class="container">
<form id="contactForm">
<label for="fname">First Name:</label>
<input type="text" name="fname"><br>
<label for="lname">Last Name:</label>
<input type="text" name="lname"><br><br>
<input type="submit" value="Add User">
</form>
<div id="showdata">

</div>
</div>
</body>
</html>
<textarea name="describe" form="contactForm">Enter description...</textarea>
18 changes: 18 additions & 0 deletions Uma/ContactCard/ContactCard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function attachHandlers(about){
$('#showdata a').on("click", function(){
alert(about);
console.log(about);
$(this).parent().children('p').text(about);
});
}

$(document).ready(function(){
$('form').on("submit", function(){
var fname = $("input[name='fname']").val();
var lname = $('input[name="lname"]').val();
var about = $('textarea[name="describe"]').val();
$('#showdata').append("<p>"+fname+" "+lname+"</p><br><a target='#'>Click for description!</a>");
attachHandlers(about);
});

});
63 changes: 63 additions & 0 deletions Uma/Debugging-jQuery/debugging_jquery.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@

body
{
background-image: url('dough.jpg');
font-family: sans-serif;
}

h2, h1, a
{
color: white;
}

#wrapper
{
background-color: rgba(2,2,2, .5);
width: 1200px;
margin: 0px auto;
}

#top_headers, #survey, ul, h3
{
display: inline-block;
}

li
{
max-width: 350px;
}

#left_content
{
width: 650px;
display: inline-block;
background-color: rgba(220, 0, 0, .6);
height: 520px;
vertical-align: top;
margin-left: 40px;
}

#right_content
{
width: 450px;
display: inline-block;
background-color: rgba(0, 220, 0, .6);
height: 520px;
vertical-align: top;
}

.box
{
vertical-align: top;
display: inline-block;
width: 300px;
padding: 10px;
}

img
{
width: 310px;
height: 200px;
display: block;
margin: 5px auto;
}
86 changes: 86 additions & 0 deletions Uma/Debugging-jQuery/debugging_jquery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<html>
<head>
<title>jQuery</title>
<link rel="stylesheet" type="text/css" href="debugging_jquery.css">
<script type="text/javascript" src='http://code.jquery.com/jquery-1.10.2.min.js'></script>
</head>
<body>
<div id='wrapper'>
<div id='top_headers'>
<h1>The Codingdojo Pizzeria!</h1>
<h2>The best slice in the valley!</h2>
</div> <!--end of top headers -->
<div id='survey'>
Question of the month: What is your favorite pizza topping?
<input type='radio' name='topping' value='pepperoni'>Pepperoni
<input type='radio' name='topping' value='bacon'>Bacon
<input type='radio' name='topping' value='pineapple'>Pineapple
<button>Tell us!</button>
</div>
<div id='left_content'>
<div class='box'>
<h3>About us!</h3>
<p>
We know that writing code works up an appetite, that's why Codingdojo is proud to announce that we are opening a
pizza kitchen inside our mountain view location! Head chef Michael "spumoni" Choi has lots of delicious family recipes
to share with our customers! Whether you like flat crust or deep dish so deep you can't cut through it,
the Codingdojo pizzeria has something you and all of your friends can agree on. Using only the
freshest ingredients the Bay area has to offer, the Codingdojo pie will be sure to debug your hunger!
</p>
</div>
<div class='box'>
<h3>Thin Crust Pizza</h3>
<ul>
<li>Small: $10.00</li>
<li>Medium: $15.00</li>
<li>Large: $20.00</li>
<li>Dojo size: $30.00 (feeds 10 ninjas)</li>
<li>Toppings: $2.00 per small, $2.50 per medium, $2.75 per large, $3.00 per Dojo</li>
</ul>
<h3>Deep dish, 'Dojo style' Pizza</h3>
<ul>
<li>Small: $12.00</li>
<li>Medium: $17.00</li>
<li>Large: $24.00</li>
<li>Dojo size: $34.00 (feeds 10 ninjas)</li>
<li>Toppings: $2.00 per small, $2.50 per medium, $2.75 per large, $3.00 per Dojo</li>
</ul>
<a href="#">Click here to order!</a>
</div>

</div> <!--end of left content -->
<div id='right_content'>
<img src="pizza.jpg">
<h5>Our pizza runs on all browsers!</h5>
<img src='logo.png'>
<h5>Made from the freshest ingredients!</h5>
</div> <!--end of right content -->
</div> <!--end of wrapper -->
<script type="text/javascript">

$('p, h3, li').hover(function(){
$(this).css('color', 'white');
}, function(){
$(this).css('color', 'black');
});

$('a').click(function(){
alert("we don't actually serve pizza...");
});

$('img').click(function(){
$(this).slideUp();
});

$('h5').click(function(){
$('img').slideDown();
});

$('button').click(function(){
var result = $('input:checked').val();
alert("Thank you for your input, we like " + result + " too!");
});

</script>
</body>
</html>
Binary file added Uma/Debugging-jQuery/dough.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Uma/Debugging-jQuery/logo.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Uma/Debugging-jQuery/pizza.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions Uma/addUser/addUser.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.container{
width: 970px;
margin: 0 auto;
text-align:center;
font-family: sans-serif;
}
table {
border-collapse: collapse;
margin: 0 auto;
margin-top: 20px;
}
input{
margin-bottom: 10px;
}
label {
display: inline-block;
width:100px;
text-align: right;
}
th {
background-color: #ff6666;
color: white;
}
tr:nth-child(even) {background-color: #f2f2f2}
38 changes: 38 additions & 0 deletions Uma/addUser/addUser.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<title>Add User Assignment</title>
<link rel="stylesheet" type="text/css" href="addUser.css">
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
></script>
<script type="text/javascript" src="addUser.js"></script>
</head>
<body>
<div class="container">
<table cellpadding="10">
<thead>
<tr>
<th id='fname'>First Name</th>
<th id='lname'>Last Name</th>
<th id='email'>Email Address</th>
<th id='contact'>Contact #</th>
</tr>
</thead>
<tbody></tbody>
</table>
<h2>Add User</h2>
<form>
<label for="fname">First Name:</label>
<input type="text" name="fname"><br>
<label for="lname">Last Name:</label>
<input type="text" name="lname"><br>
<label for="email">Email:</label>
<input type="text" name="email"><br>
<label for="contact">Contact No.:</label>
<input type="text" name="contact"><br><br>
<input type="submit" value="Add User">
</form>
</div>
</body>
</html>
10 changes: 10 additions & 0 deletions Uma/addUser/addUser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$(document).ready(function(){
$('form').submit(function(){
var fname = $("input[name='fname']").val();
var lname = $('input[name="lname"]').val();
var email = $('input[name="email"]').val();
var contact = $('input[name="contact"]').val();
$('tbody').append("<tr><td>"+fname+"</td><td>"+lname+"</td><td>"+email+"</td><td>"+contact+"</td></tr>");
return false
});
});
Binary file added Uma/assignment1/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading