Skip to content

Commit

Permalink
Ready: DOM library added with show/hide div functionality working ok
Browse files Browse the repository at this point in the history
  • Loading branch information
marianaviro committed May 3, 2018
1 parent e1bd501 commit 5c8df27
Show file tree
Hide file tree
Showing 5 changed files with 2,950 additions and 7 deletions.
3 changes: 2 additions & 1 deletion sketch1.js → first.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ var firstPrinciple = function(s) {
};

s.down = function() {
bck = '#000000';
s.select('#second').show();
s.select('#first').hide();
}

s.mouseClicked = function() {
Expand Down
11 changes: 6 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/p5.js"></script>
<script src="sketch1.js"></script>
<script src="sketch2.js"></script>
<script src="lib/p5.dom.js"></script>
<script src="first.js"></script>
<script src="second.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="principle" id="one">
<div class="principle" id="first">
</div>
<div class="principle" id="two">
<div class="principle" id="second">
</div>
<div class="principle" id="three">
<div class="principle" id="third">
</div>
</body>
</html>
Loading

0 comments on commit 5c8df27

Please sign in to comment.