I’m looking for a method in jQuery Mobile to get the path of the current page regardless of if it has been navigated to directly or loaded through Ajax.
So for both:
and:
the same path should be returned:
/page1
I know this can probably be extracted from location.href, but it will require some additional code so I’m wondering if there is a simpler more robust way.
So I finally found that you can get this by doing: