Created
December 14, 2011 16:51
-
-
Save SidneyAllen/1477400 to your computer and use it in GitHub Desktop.
jqm-cf-subscribe-02
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var profile = $.parseJSON(localStorage.getItem('123')); | |
// 3rd State | |
if(profile !== null) { | |
... | |
} else { | |
// 1st state | |
// NO PROFILE, and NOT REDIRECTING from PAYPAL | |
if(ec['url']['token'] === undefined) | |
{ | |
$('#paidContent').html('To access our premium content, please subscribe for only ' + | |
'$19.99 a year.<a href="#" id="subscribe" data-role="button">Subscribe ' + | |
'via PayPal</a>'); | |
$('#paid').page('destroy').page(); | |
$.mobile.hidePageLoadingMsg(); | |
// 2nd state | |
// REDIRECTING FROM PAYPAL GET DETAILS | |
} else { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment