diff options
Diffstat (limited to 'assets/js')
| -rw-r--r-- | assets/js/user_profile.js | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/assets/js/user_profile.js b/assets/js/user_profile.js index fa7add4..c26299b 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,35 +18,37 @@ 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"); } - });} + }); + + + + +} + + + $(document).ready(main);
\ No newline at end of file |
