magritton
12/9/2015 - 12:52 AM

JavaScript SharePoint example of loading sp.js on demand. This only works when you have an event that loads the sp.js, not on document.ready

JavaScript SharePoint example of loading sp.js on demand. This only works when you have an event that loads the sp.js, not on document.ready.

$("#jqxSubmitButton").on('click', function () {
            SP.SOD.executeFunc('sp.js', 'SP.ClientContext', updateList);
        });//ends the onclick