Quickly Build HTML5 and PhoneGap Mobile Apps

Using 3rd Party JavaScript Library In Your Mobile App

Posted: December 15th, 2011 | Author: | Filed under: Features, JavaScript | Tags: , | 4 Comments »

One of the really great benefits building a mobile Web app is that you can use any custom JavaScript, a 3rd party library or something you wrote yourself. In Tiggr Mobile Apps Builder, you build mobile Web apps (which alter can be exported as native with PhoneGap) and so you can use any custom JavaScript. How do get the custom JavaScript code in the app? There are three ways.

First is using Run Custom JavaScript action attached to any HTML event. For example, let’s say you want to invoke some custom JavaScript on button click:

This approach works well but usually should be limited to just doing “small” tasks.

The second approach allows you to import a full JavaScript file/library into your app. It’s done by creating a new JavaScript file (asset) and you get the following options:

As you can see, you can easily create a file by importing it from a URL or load it from a file.

The last option is to add a JavaScript resource via project profile (Project > Project Profile > External resources):

This option will link to the specified file.

Happy mobile development.


4 Comments on “Using 3rd Party JavaScript Library In Your Mobile App”

  1. 1 adam16ster said at 13:41 on December 23rd, 2011:

    what if you need to have one library loaded before another? how do i manage the order of things? For example, jquery UI needs to load after jquery.

  2. 2 max said at 13:52 on December 23rd, 2011:

    @adam16ster: when you use the last option (load via User-defined resources), the files will be loaded in the order they are listed.

  3. 3 adam16ster said at 14:54 on December 23rd, 2011:

    so i need to upload them in the order i want them listed. no way to reorder them once uploaded?

  4. 4 max said at 15:09 on December 24th, 2011:

    @adam16ster: no option to re-order right now, but it’s a good and simple feature we will add.


Leave a Reply


  • one × = 2