Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. function loggedIn() {
  2. $.ajax({
  3. type: "GET",
  4. url: "/api/auth",
  5. success: function (a) {
  6. if (a.success == "true") {
  7. return true;
  8. } else {
  9. return false;
  10. }
  11. }
  12. });
  13. }
  14.  
  15. <script type="text/javascript">
  16. $(function() {
  17. if (loggedIn() == true) {
  18. $('#send-to-user-btn').css('display', 'block');
  19. $('#sign-in-button-btn').css('display', 'none');
  20. $('#login-bar-my').css('display', 'none');
  21. }
  22. });
  23. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement