Load javascript file on the fly

I needed to load a javascript file on the fly with jquery so this is the solution I came up with:

$.getScript("js/test.js", function() {
    callback_function();
})
Leave A Reply
All content licensed under the Creative Commons License