ioalessio/IoFormBundle — Issue #7: Move JQuery input related code to 
Author: zhil
Created: 2011-10-22 14:16:48+00:00
State: open

I installed your bundle, but its failed to work for me :)
After digging a while, I founded reason - my js code are included in the bottom of the page, so at the point, when code like

inserted, JQuery lib is not loaded yet.

It can be fixed by moving JS scripts on top of the page, but its actually bad solution, because
1) If user have slow connection, html page can be loaded and build before actual included file loaded.
2) Its good idea to put JS includes on the bottom of the page, becase its speed up rendering of the page and improve user expirience.

So I have suggestion - rebuild code and add .ready() handler, so JQuery code will be exected when DOM model is loaded and all JS scripts are loaded.

I would gladly do it myself and submit pull request, but I dont know how I can do it in git - I just starting work with it (moved from subversion).

Let me know what do you think about this improvement.