Difference between revisions of "Team:Virginia/Notebook"
Line 84: | Line 84: | ||
jQuery(document).ready(function(){ | jQuery(document).ready(function(){ | ||
$("#right-arrow").click(function(){ | $("#right-arrow").click(function(){ | ||
+ | //removes current pages | ||
$left.addClass("inactive"); | $left.addClass("inactive"); | ||
$right.addClass("inactive"); | $right.addClass("inactive"); | ||
− | left_page_counter = left_page_counter + | + | //changes variables |
− | right_page_counter = right_page_counter + | + | left_page_counter = left_page_counter + 2; |
+ | right_page_counter = right_page_counter + 2; | ||
left_page = "#page-" + left_page_counter.toString(); | left_page = "#page-" + left_page_counter.toString(); | ||
right_page = "#page-" + right_page_counter.toString(); | right_page = "#page-" + right_page_counter.toString(); | ||
Line 94: | Line 96: | ||
$right = $(right_page); | $right = $(right_page); | ||
− | + | //displays new pages | |
− | $left.removeClass("inactive"); | + | $left.removeClass("inactive"); |
− | + | $right.removeClass("inactive"); | |
+ | }); | ||
+ | $().click(function(){ | ||
+ | //removes current pages | ||
+ | $left.addClass("inactive"); | ||
+ | $right.addClass("inactive"); | ||
+ | |||
+ | //changes variables, iff counter > 1 | ||
+ | if( left_page_counter >= 1) { | ||
+ | left_page_counter = left_page_counter - 2; | ||
+ | right_page_counter = right_page_counter - 2; | ||
+ | left_page = "#page-" + left_page_counter.toString(); | ||
+ | right_page = "#page-" + right_page_counter.toString(); | ||
+ | $left = $(left_page); | ||
+ | $right = $(right_page); | ||
+ | } | ||
+ | //displays new pages | ||
+ | $left.removeClass("inactive"); | ||
+ | $right.removeClass("inactive"); | ||
}); | }); | ||
}); | }); |
Revision as of 19:53, 10 August 2015
Team Notebook
The pages below are directly from our team notebook, which was kept throughout the whole project development process. Click on the top right corner to move forward a page, and click the top left corner to move back a page.