I have a reference to jquery-ui.min.js in the <head> of my master page - it's used to create some pop-up dialogs in an image map, among other things.
When I build the HTML5 help, to get the jQuery UI items AND the tablet/mobile navigation menu to work, I have to move the reference to jquery-ui.min.js in the output pages from the bottom of the list of scripts in the <head> to just after the reference to jquery.min.js which has been inserted by Flare.
QUESTION: Is there any way of forcing Flare to include the script at the desired position in the output pages? Or at least of automating the post-build step of moving the reference? There's only a handful of pages in the set at the moment but the number will grow, and it's a pain to have to manually make changes to every single file every time I build them.
I'm using Flare 12 with a TopNav skin, which doesn't have the old option of including scripts in the toolbar (though I don't know if that would have solved this problem or not).
Note: I know that including this script breaks the search, but that's a sacrifice I can deal with for the moment in this particular set of pages.
Order of scripts in HTML5 output
-
- Jr. Propeller Head
- Posts: 4
- Joined: Thu Jul 31, 2014 6:54 am
- Location: Northern Ireland
- Contact:
Order of scripts in HTML5 output
Catherine Sharp MISTC - Technical Author, AVEVA
Re: Order of scripts in HTML5 output
Why are you having to move the script?CSharp wrote:I have to move the reference to jquery-ui.min.js in the output pages from the bottom of the list of scripts in the <head> to just after the reference to jquery.min.js which has been inserted by Flare.
Is there some conflict with another script, e.g. MadCapAll or Foundation?
HTML5 output uses Foundation, and frameworks generally don't get on together; do you know if jQueryUI would actually work alongside Foundation?
As a side thought, Flare already utilises RequireJS; so it might be worth trying to load jQueryUI via RequireJS (if you can be bothered).
-
- Jr. Propeller Head
- Posts: 4
- Joined: Thu Jul 31, 2014 6:54 am
- Location: Northern Ireland
- Contact:
Re: Order of scripts in HTML5 output
Thanks for the reply, Dave.
There's definitely a conflict though I hadn't identified yet which script it's with. I'll work through moving the jquery-ui.min.js up one script at a time to see where the conflict is.Dave Lee wrote:Why are you having to move the script?
Is there some conflict with another script, e.g. MadCapAll or Foundation?
I've checked this and they can work alongside each other.Dave Lee wrote:HTML5 output uses Foundation, and frameworks generally don't get on together; do you know if jQueryUI would actually work alongside Foundation?
I'll give this a try. Cheers.Dave Lee wrote:As a side thought, Flare already utilises RequireJS; so it might be worth trying to load jQueryUI via RequireJS (if you can be bothered).
Catherine Sharp MISTC - Technical Author, AVEVA
Re: Order of scripts in HTML5 output
HI there - I'm having the exact same issue. I just need to be able to load jqueryui, following from this thread it appears I'll have to do it with require.js. CSharp, were you able to determine how to get requirejs to load jqueryui, perhaps?