I am using $.mobile in my app. I must create my own routing system.
I bind observer on hashchange and I pull out interesting data from location.hash.
I have a problem  - jQuery.mobile removes the hash sign from location.hash if it has a slashes   ( e.g. from 'lalal/#controller/action/param' to 'lalal/controller/action/param' and $.mobile says in yellow box Error Loading Page.
I tried to unbind existing "hashchange" in first, but then pages not load automatically ( what I require ).
How to prevent changes of hash, but that jQuery must still load the page automatically( e.g. by its ID declared in element having data-role='page')? . Below is a fragment of my router class: ( Router.load doesn't change location.hash )
__construct: function() {   
        var that = this; 
        $( window ).bind( "hashchange" , function( e ) {
            //e.stopImmediatePropagation()
            that.load( this.location.hash  ); 
        });  
    }