1

Magento CE 2.4.5 I install some theme after google brower console display follow info ,how to fix?

JQMIGRATE: jQuery.fn.click() event shorthand is deprecated
JQMIGRATE: jQuery.fn.resize() event shorthand is deprecated
JQMIGRATE: jQuery.fn.unbind() is deprecated
JQMIGRATE: jQuery.fn.delegate() is deprecated
sq y
  • 137
  • 9

1 Answers1

2

Your theme might be using older syntax of jQuery, you can ask for support if you have paid for the support or change the code by yourself with new code as show in below example.

Example :-

Change your code from

jQuery("#your_element").click(function () {
    // Your code
});

to

jQuery("#your_element").on('click', function () {
    // Your code
});

You can refer to official changelog for JQuery UI library https://jqueryui.com/changelog/1.13.2/

enter image description here

Below is the code change in official JQuery UI library repo

https://github.com/jquery/jquery-ui/commit/b53e7beb6884a8de7710146112bc48aecd8737b4

enter image description here

Tarun Bhalodia
  • 451
  • 2
  • 6
  • If this answer works as your expected, please mark it as accepted. That indicates your issue is solved and makes it easier for others with the same issue to find a verified answer. And that would be great if you click the upvote button for the answer in case you feel it is useful. – Tarun Bhalodia Nov 07 '22 at 15:32