Including JS files during export for iBook Widgets


I am looking at exporting my project to an iBook widget but use Jquery and other scripts, how can I package these into the widget?


Hi @sanjshah

You can use the option for Dashboard/iBooks Author Widget… under the File->Export as HTML5 menu.

Any scripts that you use that are placed in your resources folder will all be packaged together into your .wdgt folder


Thanks DBear, if the header of the file has a JQuery i.e.

I assume these will not be included in the resources file? so should I then just manually add these to the resources folder then compile?

When you drag a .JS file into the resources library, it adds a reference to it in the <head> of your document. You can see this by clicking 'Edit Head HTML' after you add a JS file. You can test by either exporting or previewing in a browser from within Hype. To reference items in your resource library, check out this section of our documentation.

Many thanks Daniel, I can see from the documentation how this works now.

Many thanks.

1 Like