aboutsummaryrefslogtreecommitdiff
path: root/assets/js/user_profile.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/user_profile.js')
-rw-r--r--assets/js/user_profile.js24
1 files changed, 8 insertions, 16 deletions
diff --git a/assets/js/user_profile.js b/assets/js/user_profile.js
index fa7add4..73c7897 100644
--- a/assets/js/user_profile.js
+++ b/assets/js/user_profile.js
@@ -3,10 +3,8 @@ function main(){
var items = [
$("#profile-general"),
$("#profile-follows"),
- $("#profile-friends"),
- $("#profile-inbox"),
$("#profile-comments"),
- $('#profile-send-message')];
+ $("#profile-inbox")];
function hidePages(){
items.forEach(function(item){
@@ -20,32 +18,26 @@ function main(){
// Show General page
items[0].show();
- $('.prf-page').bind('click', function(e){
+ $('.nav-o').bind('click', function(e){
e.preventDefault();
hidePages();
/* Each case will need to be changed to call a handler for fetching data
* from server*/
- switch($(this).text()) {
- case "General":
+ switch($(this).attr('id')) {
+ case "nav-profile":
console.log("clicked general");
$("#profile-general").show();
break;
- case "Following":
+ case "nav-follows":
$("#profile-follows").show();
break;
- case "Friends":
- $("#profile-friends").show();
- break;
- case "Inbox":
- $("#profile-inbox").show();
- break;
- case "Comments":
+ case "nav-comments":
$("#profile-comments").show();
break;
- case "Send Message":
- $('#profile-send-message').show();
+ case "nav-inbox":
+ $("#profile-inbox").show();
break;
default:
console.log("Error: User page not found");