/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var url = "http://affiliate.kickapps.com/service/isUserLoggedIn.kickAction?callback=?" function checkLogin(data) { if(data.isLoggedIn == "true") { // Hide Logged Out DIV document.getElementById('loggedOutMessage').style.display='none'; // Show Logged In DIV document.getElementById('loggedInMessage').style.display='block'; } else { // Show Logged Out DIV document.getElementById('loggedOutMessage').style.display='block'; // Hide Logged In DIV document.getElementById('loggedInMessage').style.display='none'; } } $.ajax({ dataType: 'jsonp', data: {as: ######}, jsonp: 'checkLogin', url: url, success: checkLogin });