Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function loggedIn() {
- $.ajax({
- type: "GET",
- url: "/api/auth",
- success: function (a) {
- if (a.success == "true") {
- return true;
- } else {
- return false;
- }
- }
- });
- }
- <script type="text/javascript">
- $(function() {
- if (loggedIn() == true) {
- $('#send-to-user-btn').css('display', 'block');
- $('#sign-in-button-btn').css('display', 'none');
- $('#login-bar-my').css('display', 'none');
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement