Skip to content

allow for the ability to load jQuery at the end of the page #215

@tisdall

Description

@tisdall

c7fe267 changed things so an explicit call to jQuery is made in deform.js. This also makes it so jQuery must now be loaded prior to deform.js. Also, because the widget templates make calls to methods in deform.js, both of those libraries must be added in the HEAD of a document.

It's fairly common practice to load your js scripts at the end of page to get something loaded on the page while a person waits for the js to load. Now there's no (easy) way of doing this because of the explicit call to jQuery in deform.js.

Could we make some sort of switch to allow loading jQuery at the end of the document?

Maybe something like this:

if (typeof dont_assume_jquery_is_loaded === 'undefined') {
   $(document).ready(function(){
      deform.load();
   });
}

Then it'll continue doing the automatic thing unless somewhere before loading deform.js you do a dont_assume_jquery_is_loaded = true;.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions