Title: Document ready code stopped working
Last modified: August 31, 2016

---

# Document ready code stopped working

 *  [Youdaman](https://wordpress.org/support/users/youdaman/)
 * (@youdaman)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/document-ready-code-stopped-working/)
 * I noticed that code that I used to populate the email field (via grabbing a url
   param and then setting the value of the email field with jQuery) stopped working
   recently.
 * The solution I came up with was to wrap the code in another document ready block:
 *     ```
       $(function() {
       var email = getUrlParameter('email');
       $('#user_email').val(email);
       });
       ```
   
 * Not sure why this is necessary when the plugin itself mentions as a caption under
   the jQuery section that the code there will be wrapped already?
 * Anyway, the above made it work again so if this helps anyone else or gives the
   developer a hint to help fix other related bugs then all good 🙂
 * [https://wordpress.org/plugins/custom-login/](https://wordpress.org/plugins/custom-login/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Austin](https://wordpress.org/support/users/austyfrosty/)
 * (@austyfrosty)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/document-ready-code-stopped-working/#post-6959967)
 * I’ll have to look into it. You can also view the login source code to see if 
   the output was missing the jQuery wrapper.

Viewing 1 replies (of 1 total)

The topic ‘Document ready code stopped working’ is closed to new replies.

 * ![](https://ps.w.org/custom-login/assets/icon.svg?rev=3077180)
 * [Custom Login](https://wordpress.org/plugins/custom-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-login/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-login/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Austin](https://wordpress.org/support/users/austyfrosty/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/document-ready-code-stopped-working/#post-6959967)
 * Status: not resolved