changePage doesn't work after submitting form
i have a page with a form. submitting the form goes like this:
- $("#add_form").bind('submit', function(event){
- event.preventDefault();
- $.get('/~polling.php', {poll_type_select: $("#poll_type_select option:selected").val(), question_input: escape($("#question_input").val()), end_select: $("#end_select").val(), multi_string:multi_string, target_select: $("#target_select").val(), type: "add_poll", user_id:user_id}, function(data) {
- alert(data);
- $.mobile.changePage($('#list_page'), 'slideup', true, false);
-
- });
- });
using alpha2, this worked just fine. in alpha 3, the changePage no longer works (the alert pops up but it just stays on the same page). with both versions, this error pops up in the console in jquery.mobile-1.0a3.min.js:49
:
Uncaught TypeError: Object #<Object> has no method 'attr'
but i don't know if that's what's causing the problem since it's occurring in alpha 2 as well.
also, there is a cancel button on the page which triggers the same changePage event. it works before submitting the form, but not after.
thanks.