diff options
| author | HumairAK <humair88@hotmail.com> | 2016-08-25 07:52:19 +0000 |
|---|---|---|
| committer | HumairAK <humair88@hotmail.com> | 2016-08-25 07:52:19 +0000 |
| commit | b1b2a1b16961d75fe92cac2d829fab829e4cf060 (patch) | |
| tree | e60949d6112c0ee8988f4efd5c08a0c73ff9d9bd /assets/js/user_profile.js | |
| parent | 0792495a750d65e2fe73a7b39f54955ec48b4b08 (diff) | |
added more user profile content
Diffstat (limited to 'assets/js/user_profile.js')
| -rw-r--r-- | assets/js/user_profile.js | 24 |
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"); |
