I\'ve read several posts about this issue but i can\'t solve it.
I am loading an html file into a div. The file i am loading contains a unordered list. This list sho
You can load javascript file dynamically with help of jQuery.getScript and set a callback function. When the script has been loaded the callback function called. Here's an example of loading highlightjs library from cdnjs:
$.getScript("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/highlight.min.js", function () {
$('pre code').each(function(i, block) {
// hljs now is available
hljs.highlightBlock(block);
});
});