Skip to content

Commit

Permalink
added anagram stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
vagrant committed Feb 6, 2014
1 parent 0cb2aa8 commit 3c83eb9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
Empty file modified Procfile
100755 → 100644
Empty file.
10 changes: 10 additions & 0 deletions public/js/hci-friends.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@ $(document).ready(function() {
*/
function initializePage() {
console.log("Javascript connected!");
$("div.project").click(projectClick);
}
function projectClick(e) {
e.preventDefault();
var oldname= $(this).find("h3").text();
var newname= anagrammedName(oldname);
console.log(newname);
$(this).find("h3").text(newname);



}
function anagrammedName(name) {
// Thanks, Internet Anagram Server!

Expand Down
16 changes: 8 additions & 8 deletions views/index.handlebars
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@
</head>

<body>
<div class="container">
<h1>My HCI Friends</h1>

<div>
<!--<div>
<img src= "http://lorempixel.com/500/500/people">
<h3> Fake Friend </h3>
these are my fake firends
</div>
<p>these are my fake firends</p>
</div>-->

{{#each projects}}
<div class="project" id="{{id}}">
<a href="project" class="">
<img style='width: 40%' src="{{imageURL}}" ... />
<p>{{name}}</p>
</a>
<img style='width: 40%' src="{{imageURL}}"/>
<a href="#" class=""><h3>{{name}}</h3></a>
<p>{{description}}</p>
</div>
{{/each}}

Expand All @@ -52,7 +52,7 @@
</div>
<input type="submit" id="submitBtn" class="btn btn-default" value="Add the friend"></input>
</form>

</div>

</body>
</html>

0 comments on commit 3c83eb9

Please sign in to comment.