| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/school-anc/jquerymobile/demos/navigation/ |
Upload File : |
(function( $ ) {
// On document ready
$(function() {
// Bind to the navigate event
$( window ).on( "navigate", function() {
console.log( "navigated!" );
});
// Bind to the click of the example link
$( "#event-example" ).click(function( event ) {
event.preventDefault();
location.hash = "foo";
});
// Bind to the click of the example link
$( "#method-example" ).click(function( event ) {
// Append #bar
$.mobile.navigate( "#bar", {
info: "info about the #bar hash"
});
// Replace #bar with #baz
$.mobile.navigate( "#baz" );
// Log the results of the navigate event
$( window ).on( "navigate", function( event, data ){
console.log( data.state.info );
console.log( data.state.direction );
console.log( data.state.url );
console.log( data.state.hash );
});
// Go back to pop the state for #bar and log it
window.history.back();
});
});
})( jQuery );