Reputation: 89
I have a problem working with JQuery.
After
$.mobile.changePage(*toPage*);
is executed somehow the format of JQueryMobile is lost?
Is there an easy solution to tackle this problem?
Here is my HTML-Code:
<form action="" data-bind=" template:{ 'if': loginVM, data: loginVM }" id="myLogin" data-role="page">
//Some Code
</form>
<form action="" data-bind="template: { 'if': startVM, data: startVM }" id="myStart" data-role="page">
//Some Code
</form>
Somehow if the DOM is altered the Style is lost!
Upvotes: 1
Views: 178
Reputation: 3942
I believe each page should have a data-role with an id, so:
<div data-role="page" id="login">
<form action="" data-bind=" template:{ 'if': loginVM, data: loginVM }" id="myLogin">
//Some Code
</form>
</div>
<div data-role="page" id="start">
<form action="" data-bind="template: { 'if': startVM, data: startVM }" id="myStart">
//Some Code
</form>
</div>
Upvotes: 1