I'm working with jQuery Mobile.
My Code for move to details div ::
<a href="#details" data-ajax="true" data-transition="pop" data-role="button" data-inline="false" data-icon="info">Go To Details</a>
Now, I want to authenticate user with Facebook.
So I have applied ::
<a href="javascript:userLogin()" data-ajax="true" data-transition="pop" data-role="button" data-inline="false" data-icon="info"> Login with Faceook </a>
Function Calling for Authentication
function userLogin() {
FB.login(
function(response) {
if (response.authResponse) {
alert('logged in');
FB.api('/me', function(response) {
alert("Welcome " + response.name);
});
} else {
alert('not logged in');
}
},
{ scope: "email" }
);
}
I'm getting valid user response after authentication.
Now I want to navigate to that details div.
So, how can I implement that ajax code after successfully login ??
Any suggestion will be appreciated.
Thanks.
$('a[href="#details"]').click()