Conversation
|
comments? Isn't this the most ideal fix for everyone? |
|
Alright, this has been collecting dust for 3 months now... Can I get some feedback or a commit? All this code is doing is confirming jQuery is loaded before calling it. It allows for the very common case of loading js at the end of the page. |
|
Hi @tseaver, Would you consider this PR to be included? Would it break anything? |
|
Okay, update for @mvaled @dwt and anyone else reading this... The consensus is this won't be included until the following other changes are made:
Until then... You just need to run your own copy of deform.js instead of the one included in the package. |
|
Hi @tisdall, Thanks for the update. I wasn't aware of those other cases. However, I do suggest a change to the current documentation. As I commented in #156, the documentation suggests to put the call near the end of the HTML page. Currently, it reads:
(The bolds are mine to emphasize). The call is mostly useless since deform.js itself registers the callback. Is there any use case for calling |
|
TBH with HTTP/2 coming over the horizon I don't think we really need to work too much about when we load which library. However, I do agree with the general thrust of the change. |
solves #156 #211 #215 indirectly
Instead of blindly calling jQuery in
deform.js, first test that it's loaded before calling. This way you can now postpone loading jQuery until the end of a document and then make your own call to$(document).ready(function(){ deform.load(); });. Without this change, the forced call to jQuery simply throws an error and no further javascript is processed.