Reputation: 703
I'm using jquery mobile 1.3.2, and whenever I press the button, the button shows the style of being pressed, but then it never come back up again.
HTML:
<form id="login_form">
<input type="text" name="username">
<input type="password" name="password">
<button type="submit" data-theme="b" data-role="submit">Login</button>
</form>
Javascript:
$("#login_form").submit(function()
{
$.mobile.allowCrossDomainPages = true;
var options = {
url:API_SERVER_URL+"/login",
type: "post",
success: function(data)
{
if (data.success)
{
$.mobile.changePage('success.html', {transition: "slide"});
}else
{
alert("failed:(");
}
},
error: function()
{
alert('cannot connect');
}
};
options = $.extend(DEFAULT_AJAX_OPTIONS, options);
$(this).ajaxSubmit(options);
return false;
});
Upvotes: 1
Views: 104