I\'ve build a mobile site using jQTouch, and now I\'ve been working to get that same site working with PhoneGap. For PhoneGap, I\'ve moved most all of the assets (pages, im
I know this is 6/7 years old, but for any others arriving here for the same question... Here's a solution, since there isn't a more "packaged" one:
3 quick steps:
1) Store your site domain in a global javascript variable
var currentloc = 'https://example.com'
2) Use temporary variable to add your relative path to currentloc
var relpath = '/need/jsonex'
var ajaxcall = currentloc + relpath
$.ajax({...
3) Adjust currentloc
if you do change the supposed "location" that you're calling relative path from on site
currentloc = currentloc + '/new/path'
** just remember if you make currentloc
a global variable you need to keep track of these changes.
Hope this helps.