Title: Please write correct Jquery JS and change .click to on(&#8220;click&#8221;, function(){})
Last modified: January 28, 2026

---

# Please write correct Jquery JS and change .click to on(“click”, function(){})

 *  Resolved [BackuPs](https://wordpress.org/support/users/neo2k23/)
 * (@neo2k23)
 * [3 months, 1 week ago](https://wordpress.org/support/topic/please-write-correct-jquery-js-and-change-click-to-onclick-function/)
 * Can you please change the .click to on(‘click’, function(){}} so we can get rid
   of all the warnings and deprecated messages in the js console?
 * Turn on wordpress script debug mode in the wp-config.php and you will see the
   messages
 *     ```wp-block-code
       // Enable WP_DEBUG modedefine( 'WP_DEBUG', true );// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)define( 'SCRIPT_DEBUG', true );
       ```
   
 * 
   They are all located in rating.php there are 3 .click left to change.
 *     ```wp-block-code
                   <script>
                   jQuery(document).ready(function ($) {
   
                       $( '#" . esc_js( $this->text_domain ) . "_btn_already_did' ).on( 'click', function() {
   
                           $.ajax({
                               url: ajaxurl,
                               type: 'POST',
                               data: {
                                   action     : 'wpmet_rating_never_show_message',
                                   plugin_name : '" . esc_js( $this->text_domain ) . "',
                                   nonce : '" . esc_js( wp_create_nonce( 'wpmet_rating' ) ) . "'
   
                               },
                               success:function(response){
                                   $('#" . esc_js( $this->text_domain ) . "-_plugin_rating_msg_used_in_day').remove();
   
                               }
                           });
   
                       });
   
                       $('#" . esc_js( $this->text_domain ) . "_btn_deserved').click(function(){
                           $.ajax({
                               url: ajaxurl,
                               type: 'POST',
                               data: {
                                   action     : 'wpmet_rating_never_show_message',
                                   plugin_name : '" . esc_js( $this->text_domain ) . "',
                                   nonce : '" . esc_js( wp_create_nonce( 'wpmet_rating' ) ) . "'
                               },
                               success:function(response){
                                   $('#" . esc_js( $this->text_domain ) . "-_plugin_rating_msg_used_in_day').remove();
   
                               }
                           });
                       });
   
                       $('#" . esc_js( $this->text_domain ) . "_btn_not_good').click(function(){
                           $.ajax({
                               url: ajaxurl,
                               type: 'POST',
                               data: {
                                   action     : 'wpmet_rating_ask_me_later_message',
                                   plugin_name : '" . esc_js( $this->text_domain ) . "',
                                   nonce : '" . esc_js( wp_create_nonce( 'wpmet_rating' ) ) . "'
                               },
                               success:function(response){
                                   $('#" . esc_js( $this->text_domain ) . "-_plugin_rating_msg_used_in_day').remove();
   
                               }
                           });
                       });
   
                       $('#" . esc_js( $this->text_domain ) . "_btn_never_show').click(function(){
                           $.ajax({
                               url: ajaxurl,
                               type: 'POST',
                               data: {
                                   action     : 'wpmet_rating_never_show_message',
                                   plugin_name : '" . esc_js( $this->text_domain ) . "',
                                   nonce : '" . esc_js( wp_create_nonce( 'wpmet_rating' ) ) . "'
                               },
                               success:function(response){
                                   $('#" . esc_js( $this->text_domain ) . "-_plugin_rating_msg_used_in_day').remove();
   
                               }
                           });
                       });
   
                   });
                   </script>
       ```
   
 * Thank you

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

 *  Plugin Support [Reedwanul Haque](https://wordpress.org/support/users/reedwanul/)
 * (@reedwanul)
 * [3 months ago](https://wordpress.org/support/topic/please-write-correct-jquery-js-and-change-click-to-onclick-function/#post-18805306)
 * Dear [@neo2k23](https://wordpress.org/support/users/neo2k23/),
 * Thanks for reaching out to us & extremely sorry for the delayed response.
 * I have forwarded your query to our development team for further review. They 
   are currently investigating the issue, and we’re hopeful a solution will be identified
   soon.
 * I’ll keep you updated as soon as I receive any information from the team. Please
   stay tuned for further updates.
 * Best Regards,
   Reju
 *  Plugin Support [Reedwanul Haque](https://wordpress.org/support/users/reedwanul/)
 * (@reedwanul)
 * [2 months ago](https://wordpress.org/support/topic/please-write-correct-jquery-js-and-change-click-to-onclick-function/#post-18837881)
 * Dear [@neo2k23](https://wordpress.org/support/users/neo2k23/) ,
 * I hope you are doing well. Please accept our apologies for the delayed response.
   The issue has been resolved in version **3.8.0**. Kindly update the plugin to
   the latest version to apply the fix. We truly appreciate your patience and cooperation
   in this matter.
 * Best Regards,
   Reju

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplease-write-correct-jquery-js-and-change-click-to-onclick-function%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/elementskit-lite/assets/icon-256x256.gif?rev=2518175)
 * [ElementsKit Elementor Addons - Advanced Widgets & Templates Addons for Elementor](https://wordpress.org/plugins/elementskit-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/elementskit-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/elementskit-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/elementskit-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/elementskit-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/elementskit-lite/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Reedwanul Haque](https://wordpress.org/support/users/reedwanul/)
 * Last activity: [2 months ago](https://wordpress.org/support/topic/please-write-correct-jquery-js-and-change-click-to-onclick-function/#post-18837881)
 * Status: resolved