This example is perfect example of custom JavaScript library. It can be used anywhere on any platform. It contains loading of external resource like jquery and bootstrap. Also there is example of binding HTML to any element and calling AJAX request. Also you can create dynamic iframe and load any URL in it.