0

I am new in Jquery MObile.

I need to use my some aspx pages in JQuery Mobile. I have problem with Redirection using navigation.

Here I am expalining you my senario. have 3 apge HOme.aspx,Signin.aspx, signup.aspx

   <div data-role="page" id="divHome" data-hash="false">
        <div data-role="header">
            <div data-role="navbar">
                <ul>
                    <li><a href="SignUp.aspx" data-transition="slidedown">Sign Up</a></li>
                    <li><a href="SignIn.aspx" data-transition="slidedown">Sign In</a></li>
                    <li><a href="#" class="ui-btn-active" data-transition="slidedown">Home</a></li>
                </ul>
            </div>
        </div>
        <div>
            <div data-role="content">
                Home Page
            </div>
        </div>
        <div data-role="footer" data-position="fixed" data-id="ew-footer">
            <div class="title1" style="height: 20px">
                <h2 style="font-size: 12px">
                    Footer</h2>
            </div>
        </div>
    </div>

Here Is my home.aspx when I am click on signUp.aspx page its load that page but now then after if I press my submit button on sign up page not any operation work but when I refresh the page and then its work fine. and I had used document ready function but this function is not work when I am refreshing the page then after its fire.. :( :(

or If you have any sample link for this jQuery Mobile with asp.net then also provide me so I can learn from them...

so kindly help me...

Thankx in advance.

Atul Patel
  • 163
  • 2
  • 4
  • 9

1 Answers1

0

Short answer, you don't use document.ready, this is only fired once - jQM (jQuery Mobile) loads pages via AJAX unless you tell it not to. If you don't mind losing transitions just use data-ajax="false" in your links.

If you still want transitions you need to listen for jQM's pagecreate/pageshow events on the pages, this gives you a kind of document.ready where you can put the code you want to run on each page. I have a more detailed answer here: Jquerymobile - $.mobile.changepage

Community
  • 1
  • 1
Clarence Liu
  • 3,874
  • 2
  • 25
  • 29