'After wordpress update 5.8.3 does not working jquery [closed]

I have a random theme and inside the theme is scripts.js, to which I can also add my own functions. Before the Wordpress update the script worked, now nothing works. In the script, of course, there are additional functions for my calculator and toolbar that are on the page, but unfortunately they don't work now. As other tutorials say that "$" can be changed to "jQuery", but that didn't help. I also tried to use a plugin like "jQuery update", but that didn't help either. I don't know if I should completely rebuild the calculator or maybe do a Wordpress downgrade.



Solution 1:[1]

Did you try installing the jQuery Migrate Helper Plugin: https://wordpress.org/plugins/enable-jquery-migrate-helper/ ?

This helps you to keep outdated jQuery-Versions working in your WordPress-enviornment in first place.

If I was facing problems like that, I would be thinking about re-building the calculator.

Solution 2:[2]

Solved it, put those code rows into functions.php and jquery worked.

if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
function my_jquery_enqueue() {
   wp_deregister_script('jquery');
   wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false, null);
   wp_enqueue_script('jquery');
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 dominikjosch
Solution 2 junior