Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tisdall opened this issue May 30, 2014 · 3 comments
Closed

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

tisdall opened this issue May 30, 2014 · 3 comments

Comments

@tisdall
Copy link
Contributor

tisdall commented May 30, 2014

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;.

@tisdall
Copy link
Contributor Author

tisdall commented Jul 11, 2014

Any comments on this? Am I the only one who doesn't want to load jQuery until the end of the page?

@tisdall
Copy link
Contributor Author

tisdall commented Jul 15, 2014

related to PR #156

@tisdall
Copy link
Contributor Author

tisdall commented Aug 8, 2014

I'm going to close this as #229 is the best way to deal with this.

@tisdall tisdall closed this as completed Aug 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant