Sha256: 9ece4de3d4749cc4fc4d411db37e9219d33394244a0122a2273b712c042132aa
Contents?: true
Size: 1011 Bytes
Versions: 18
Compression:
Stored size: 1011 Bytes
Contents
(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 );
Version data entries
18 entries across 18 versions & 1 rubygems