Title: Request: Please update JS code
Last modified: August 30, 2016

---

# Request: Please update JS code

 *  [xmmassage](https://wordpress.org/support/users/xmmassage/)
 * (@xmmassage)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/request-please-update-js-code/)
 * Hello again ),
 * Can you please update your front.js and change:
 * FROM
 * jQuery( document ).ready( function( $ ) {
    … })
 * TO
 * document.addEventListener(‘DOMContentLoaded’, function(event) {
    … })
 * Many SEO optimization plugins move JS files in footer of the website. In this
   case JQUERY is available later then your script require it.
 * There are several more issues why it is not good to be tied with JQUERY untill
   document loaded. Anyway, all users who is using such plugins will get “JQuerry
   is not defined” error in your script.
 * Using simple JS is much better and risk free.
 * Thank you!
 * [https://wordpress.org/plugins/attendance-manager/](https://wordpress.org/plugins/attendance-manager/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [tnomi](https://wordpress.org/support/users/tnomi/)
 * (@tnomi)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/request-please-update-js-code/#post-6655729)
 * Thank you for your feedback.
 * I wanted to use jQuery.
    But a parameter to “wp_enqueue_script()” seems to have
   been insufficient. [https://codex.wordpress.org/Function_Reference/wp_enqueue_script](https://codex.wordpress.org/Function_Reference/wp_enqueue_script)
 * 3rd parameter: $deps
    The handle of all the registered scripts that this script
   depends on, that is the scripts that must be loaded before this script.
 * 5th parameter: $in_footer
    When the theme has the wp_footer() template tag, the
   script is placed before the </body> end tag.
 * I will correct these parameters.
    Thank you.
 *  Thread Starter [xmmassage](https://wordpress.org/support/users/xmmassage/)
 * (@xmmassage)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/request-please-update-js-code/#post-6655798)
 * Not sure I understood the problem you are trying to describe ).
 * BTW: Can you please add some more information about your updates. It is second
   update with the comment “Some filters were added.”. Which filters, what for, 
   where ))?
 * You see, I’m using hardly hacked version of your plugin. Most of hacks are about
   UI and it is not really easy decision for me to update it, because I need to 
   put my hacks back each time. So, I just want to know if new version worth updating
   or not ).
 * PS: If you have time I can e-mail to you with the link to show you how and where
   I’m using your plugin and discuss my UI hacks. Maybe some of them can become 
   optional in your plugin.
 *  Plugin Author [tnomi](https://wordpress.org/support/users/tnomi/)
 * (@tnomi)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/request-please-update-js-code/#post-6655825)
 * I am depending on Google translation too much, because I am not good at English.
   
   So I want to apologize for lack of my understanding. Sorry.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Request: Please update JS code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/attendance-manager.svg)
 * [Attendance Manager](https://wordpress.org/plugins/attendance-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/attendance-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/attendance-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/attendance-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/attendance-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/attendance-manager/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [tnomi](https://wordpress.org/support/users/tnomi/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/request-please-update-js-code/#post-6655825)
 * Status: not resolved