Issue on redirecting using listview menu
Hello everyone,
I'm having some issues using listview for menu navigation, here is the code that I use to navigate along internal pages inside a html file:
- <!-- Beggining of Navigation Page -->
- <div data-role="page" class="contenidoPagina" id="indexPage">
- <!-- Social Header -->
- <div class="ui-header">
- <div class="social">
- <a class="phone ui-link" href="tel:***" title=""> </a>
- <a class="gplus" href="https://plus.google.com/***" title=""> </a>
- <a class="fb ui-link" href="https://www.facebook.com/***" title=""> </a>
- <a class="twitter ui-link" href="http://twitter.com/***" title=""> </a>
- </div>
- <div class="logo"><a href="index.html" title="Back to web main page"><img src="image/comun/header/logotipo.png" alt="***" /></a></div>
- </div>
- <!-- Navigation Index -->
- <h1 id="bannerSTR">Title main menu</h1>
- <div id="navIndexPage" data-role="content">
- <!-- Main navigation links -->
- <ul data-role="listview" data-inset="true" data-theme="d">
- <li><a href="#firstpage"><img src="image/comun/nav/relojdepulsera.png" alt="Reparación de relojes Racer" class="ui-li-icon">First page</a></li>
- <li><a href="#secondpage"><img src="image/comun/nav/fornitura.png" alt="Fornitura Racer" class="ui-li-icon" style="margin-left:-0.3em;">Second page</a></li>
- <li><a href="#thirdpage"><img src="image/comun/nav/repartonacional.png" alt="Racer" class="ui-li-icon" style="margin-left:-0.1em;">Third page</a></li>
- <li><a href="#fourthpage"><img src="image/comun/nav/info.png" alt="Racer" class="ui-li-icon" style="margin-left:-0.1em;">Fourth page</a></li>
- <li><a href="#fifthpage"><img src="image/comun/nav/servicioadomicilio.png" alt="Contacto" class="ui-li-icon" style="margin-left:-0.3em;">Fifth page</a></li>
- </ul>
- </div>
- <!-- Fin Content -->
- </div>
- <!-- End of Navigation Page -->
As you can see I'm using href for local page's ID redirection, here's an example of one of this here:
- <!-- Beggining of second Page -->
- <div data-role="page" class="contenidoPagina" id="secondpage">
- <!-- Social Header -->
- <div class="ui-header" >
- <div class="social">
- <a class="phone ui-link" href="tel:****" title=""> </a>
- <a class="gplus" href="https://plus.google.com/***" title=""> </a>
- <a class="fb ui-link" href="https://www.facebook.com/***" title=""> </a>
- <a class="twitter ui-link" href="http://twitter.com/***" title=""> </a>
- </div>
- <div class="logo"><a href="index.html" title="Volver a la portada"><img src="image/comun/header/logotipo.png" alt="***" /></a></div>
- </div>
- <!-- Main content of second page -->
- <div data-role="content">
- <h2>Page Title</h2>
- <article class="exampleArticle">
- <p>
- Example text
- </p>
- <!-- Inside HTML page navigation -->
- <div data-role="controlgroup" data-type="horizontal" class="navArticle">
- <a href="#firstpage" data-role="button" data-icon="arrow-l" data-iconpos="notext" data-theme="b">First page</a>
- <a href="#indexPage" data-role="button" data-icon="home" data-iconpos="notext" data-theme="b">Main Menu</a>
- <a href="#thirdpage" data-role="button" data-icon="arrow-r" data-iconpos="notext" data-theme="b">Third page</a>
- </div>
- <p></p>
- </article>
- </div><!-- end content -->
- </div>
- <!-- End of second Page -->
I have realized that this code only works when the page is reloaded, you can find a page where this issue can be found
here
I'm using HTML5, JQuery Mobile 1.3.1 and JQuery 1.9.1
Any support would be helpful