$.mobile.changePage after some operation on next page! How?
Hi, i have a little problem (i hope).
In a my script when the user click on a link to page2 i need to do some operation before the transition. How i can?
Follow my script:
- $(".team-link").live("click",function(){
-
- var id_team = $(this).attr("id");
- var where = "id_team="+$(this).attr("id");
- $("#page3 .page-add-player").attr("title", id_team);
- var team = $(this).attr("title");
- $("#team_page .team_page_header h1").html(team).attr("title",id_team);
-
- $("#team_page fieldset").html("");
-
- list_players_team(where);
- //after the previusly operation i want the transition to #team_page
- $.mobile.changePage('#team_page', { transition: "slide" } )
-
- })
How you can see my script is simple, when i click on team-link start some operation and after these start transition. Oviusly this script not work because actualy after the transition i still see the work of list_players() function.
Thanks for any helps !