mardi 17 février 2015

jquery mobile transition link to the same page with href


What is the best way to accomplish this. I have a page which gets loaded with selected:



....
<div data-role="content" style="">
<ul data-role="listview">
<li><a href="#departmentPage">Departments</a></li>
</ul>
</div>
</section>
....

<section id="departmentPage" data-role="page">

<section data-role="panel" id="departmentPageMenu" data-position="left" data-dismissible="false" data-display="overlay" style="">
<header data-role="header" id="Header2" style="">
<h1>Menu</h1>
<a href="#pressReleasePageMenu" data-role="button" data-icon="arrow-l" data-iconpos="notext" data-theme="c">Close</a>
</header>

<div data-role="content" style="">
<ul data-role="listview">
</ul>
</div>
</section>


<header data-role="header" id="departmentPageHeader">

<a style="" id="pressReleaseHome" href="#departmentPageMenu" data-role="button" data-icon="grid" data-iconpos="notext" data-theme="c">Home</a>
<h2 style=" font-size: 18px;" id="pressReleaseTitle" >Departments</h2>

</header>

<div data-role="content" id="departmentPageContent" style="">

<div id="contentData" style="color: #262626; font-size: 16px;font-family: Helvetica, Arial, sans-serif; margin-bottom: 30px; padding-left: 30px; padding-right: 30px; ">
</div>

<div style="text-align: center;">
<div style="" id="paginationContainer"></div>
</div>

</div>
</section>


which puts the link as:


http://localhost/MDefault.aspx#departmentPage


this page pulls a departments list that each is wrapped in an anchor Ex. HR


But if I select this the page goes back to the initial page not the departmentsPage. Ive tried modifying the link:


HR


But nothing happens. What is the best way to handle this so that the link goes back to the departmentsPage?





Aucun commentaire:

Enregistrer un commentaire