javascript - how to move across tabs programmatically -
i have code tabs...
<!-- start first page --> <div data-role="page" id="homepage" data-dom-cache="true" data-rel="dialog"> <div data-role="header" data-position="fixed" data-id="header"> </div> <div data-role="navbar"> <ul> <li><a href="#homepage" class="ui-btn-active ui-state-persist" >enter data</a></li> <li><a href="#syncdata" >sync data</a></li> <li><a href="#managedata">manage data</a></li> </ul> </div><!-- /navbar --> </div> <!-- /header --> </div><!-- /page --> <!-- start second page --> <div data-role="page" id="syncdata" data-rel="dialog" data-dom-cache="true"> <div data-role="header" data-id="header1" data-position="fixed"> </div> <div data-role="navbar"> <ul> <li><a href="#homepage">enter data</a></li> <li><a href="#syncdata" class="ui-btn-active ui-state-persist" >sync data</a></li> <li><a href="#managedata">manage data</a></li> </ul> </div><!-- /navbar --> </div><!-- /header --> </div><!-- /page --> <!-- start third page --> <div data-role="page" id="managedata" data-rel="dialog" data-dom-cache="true"> <div data-role="header" data-id="header2" data-position="fixed"> </div> <div data-role="navbar"> <ul> <li><a href="#homepage">enter data</a></li> <li><a href="#syncdata" >sync data</a></li> <li><a href="#managedata" class="ui-btn-active ui-state-persist" >manage data</a></li> </ul> </div><!-- /navbar --> </div> <!-- /header --> <div data-role="popup" id="dialog-confirm" style="display: none" data-overlay-theme="b" data-theme="b"> <div data-role="content" data-theme="b" class="ui-corner-bottom ui-content"> <h3 class="ui-title">low storage space!!</h3> <p>you must perform 1 of actions below before proceed!.</p> <a href="#" data-role="button" data-inline="true" id="syncdataid" data-theme="c">sync data</a> <a href="#" data-role="button" data-inline="true" id="backupdataid" data-theme="c">backup data</a> <a href="#" data-role="button" data-inline="true" id="increasestoragespaceid" data-theme="c">increase storage space</a> <a href="#" data-role="button" data-inline="true" id="cancelid" data-theme="c">cancel</a> </div> </div> </div><!-- /page -->
i want change sync data wen click on sync data button on popup dialog on manage data tab. should happen on click button event e.g
$('#syncdataid').click(function () { //change sync data tab page }
am new jquery.any willl appreciated.thanks
use $.mobile.changepage(hashedpage)
hashedpage '#' + 'id of div has data-role page'.
Comments
Post a Comment