Skip to content

Instantly share code, notes, and snippets.

@lucasjans
Created January 31, 2012 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucasjans/1713146 to your computer and use it in GitHub Desktop.
Save lucasjans/1713146 to your computer and use it in GitHub Desktop.
Trying to load script in specific place
//snippet inside a page_load event
DotNetNuke.Web.Client.ClientResourceManagement.ClientResourceManager.RegisterScript(Page, "http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js", DotNetNuke.Web.Client.FileOrder.Js.jQuery, "PageHeaderProvider")
@irobinson
Copy link

FYI - the FileOrder enumeration is really meant to be used internally - I'd recommend either creating your own enumeration or just using the integer value that places it in the appropriate order (e.g. if you want it to load after jQuery but before jQuery UI you would give it an order of 6,7,8 or 9 - as jQuery is 5 and jQuery UI is 10).

@lucasjans
Copy link
Author

Thanks Ian, I'll give that a shot! I'm trying to match up with this: http://jquerymobile.com/demos/1.0.1/docs/pages/page-anatomy.html

Do you see any reason why that's not possible? Without the exact order, I can get it working on most desktop browsers, but not on the Android browser. :(

Hope all is well, had a great time visiting Cuong in Vietnam... wish I was there in April!

@irobinson
Copy link

Hmm, you should be able to register jQuery Mobile with a priority of 6 and it'll load immediately after jQuery. Has that worked for you?

Glad to you had a good trip - too bad ours didn't overlap! Any reason not to just go back in April? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment