Hi,
There's no option to remove the surrounding stuff that's rendered in HTML in the administration interface mode.
You can only detect when the page is viewed in Live site mode and if the browser device is a mobile and only then load the jQuery Mobile.
The livesite viewmode can be detected as:
CMSContext.ViewMode == ViewModeEnum.LiveSite
Mobile device browser can be detected using our BrowserHelper:
CMS.GlobalHelper.BrowserHelper.IsMobileDevice();
You're using Portal Engine, therefore the code has to be placed somewhere outside of admininstration interface. You have about two options where to put that logic:
If you're using jQuery Mobile functionality everywhere, place it in
~\CMSPages\PortalTemplate.aspx.cs
if only in specific parts of the site, you could create you own web part and use the code in it's code-behind.
Hope this will help.
Regards,
Zdenek C.