Skip to content

Instantly share code, notes, and snippets.

@susanBuck
Created November 10, 2011 15:58
Show Gist options
  • Save susanBuck/1355202 to your computer and use it in GitHub Desktop.
Save susanBuck/1355202 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<head>
<title>NomNom iteration 1</title>
<!DOCTYPE html>
<head>
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="nomnom.css">
<script type='text/javascript'>
/*-------------------------------------------------------------------------------------------------
Expand divs on click
function expand(whichContent) {
$('#answer-' + whichContent).toggle('slow');
}
function expand_all() {
$('#meal_list').toggle('slow');
}
-------------------------------------------------------------------------------------------------*/
$(document).ready(function() {
/*-------------------------------------------------------------------------------------------------
Grow Width
-------------------------------------------------------------------------------------------------*/
$('#leftArrow').click(function(){
var min = 620;
var max = 1300;
if ($('#right').css('width') == min + "px") {
$('#right').animate({width:max,left:40},'fast');
$('.meal').animate({width:1000},'fast');
}
else {
$('#right').animate({width:min,left:500},'fast');
$('.meal').animate({width:550},'fast');
}
});
});
</script>
</head>
<!-------------------------------------------------- fixed div for colored background && Top Bar------------------------------------------------->
<body background="">
<!-------------------------------------------------- I want Jquery to give food slide show---------------------------------------->
<div id = 'top_bar'>
<div id = 'logo'></div>
<div id = 'search'></div>
</div>
<!-------------------------------------------------- div for left and right blocks -------------------------------------------------->
<div id = 'left'>
<br><br>
<div class = 'meal_label'></div>
<br><br>
<div class = 'meal'>
<input type="checkbox" class="styled" /></br>
<input type="checkbox" class="styled" /></br>
<input type="checkbox" class="styled" /></br>
</div>
<br><br><br><br><br><br><br><br><br>
<div class='button_reply' id = 'addFood' ></div>
</div>
<div id = 'right'>
<br><br>
<div class = 'meal_label'></div>
<br><br>
<div class = 'meal'>testing</div>
<br><br><br><br><br><br><br><br><br>
<div class='button_leftArrow' id = 'leftArrow' ></div>
</div>
</body>
</html>
<!-- Localized -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment