Today I took a new jQuery plugin that I was playing with from an R8.5.3 environment where it worked, to an R9 environment and it failed – I figured it had something to do with something I had been reading about over the last month and in fixing my problem this lead to a more serious realization that I KNOW other people are also going to come across.
Background
A brief scan of the last month’s discussions on Xpages and jQuery Mobile 1.3 reveals a number of posts started by Dave Leedy regarding the use of IBM Notes Domino 9 and jQuery Mobile 1.3
http://notesin9.com/index.php/2013/04/20/jquery-mobile-seems-incompatible-with-xpages-in-domino-9-0
http://hasselba.ch/blog/?p=1216
http://stackoverflow.com/questions/16058039/jquery-mobile-in-xpages-passing-parameters
http://www.eknori.de/2013-04-21/followup-jquery-mobile-seems-incompatible-with-xpages-in-domino-9-0/
What’s going on?
I saw the following Tip from Sven Hasselbach (very smart man!) on Dave Leedy’s blog post
Looks like an AMD loader problem with Dojo & JQM. I have tried out to disable the Factory scan in a test page and this worked for me. To do this I have added the following parameters in the xsp.properties:
xsp.client.script.dojo.djConfig=dojo-amd-factory-scan: false
Maybe this can help you with your problems in ND9.
This lead me to this bug report
https://bugs.dojotoolkit.org/ticket/15616
make dojo work with other AMD loaders
Which then lead me to the realization that this is a bigger issue than just JQM 1.3 and I solved my problem and here is how.
Solution (ND9)
Within the Package Explorer (Window—open perspective –> xpages) in the WebContent folder for your database you will find the xsp.properties file (as described http://heidloff.net/home.nsf/dx/06172011015521AMNHE8Y7.htm)

Click to open the Source Tab
and enter the following
xsp.client.script.dojo.djConfig=dojo-amd-factory-scan: false
And Save – that’s it
Result
If you look at the source code of the created XPage you will see that the new parameter has been added to the script tab creating the dojo.js as a djConfig property

doing a quick search explains what this property does
http://dojotoolkit.org/documentation/tutorials/1.8/dojo_config/
“For example, we could disable the amd factory scan (scanning the module for CommonJS require(module) statements to load as deps) with…”
Not only does that solve the problem with jQuery Mobile, it also solved my problem with the jQuery Table plugin which I wanted to use, which used require.js to load the jQuery dataTable plugin.
GENIUS
thank you Sven Hasselbach (again!)