change to davis.js routing lib
<p>I use pushstate/popstate build a demo, but I'm wondering <strong>if Davis.js js routing lib how to use here, can anyone help me for below example?</strong><br>
Thanks!!</p>

<p><strong>with davis.js</strong> index.php</p>

<pre><code>print"&lt;a class=\"a\" href=\"$result[id]\"&gt;&lt;/a&gt;";
if($_GET['id']){
    if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){
        print"
            &lt;div class=\"wrapb\"&gt;
                &lt;div class=\"b\"&gt;&lt;/div&gt;
                &lt;div class=\"close\"&gt;&lt;/div&gt;
            &lt;/div&gt;
        ";
    }
}
</code></pre>

<p>js</p>

<pre><code>var app = Davis(function(){
    this.get('?id=:name', function(req){
        var b = $(req).filter('.wrapb').html();
            $('.a').before(b);
            $('.close').click(function(){
                history.back();
            });
    })
})
</code></pre>
