Hi @talat
Thanks for the feedback. I’ve re-checked your website and the HTML code and I can reproduce the issue you mention.
It looks like that the issue is caused by the alternate jQuery version you load – WordPress includes jQuery 3.5.1 (which is loaded on your website). However, you also load the jQuery version 3.6.0 from the google-CDN, which replaces the default jQuery that ships with WordPress.
I can see the place in code that’s not compatible and we’ll fix it in the next release. However, if there is no really good reason to use a custom jQuery version, I would stick to the default jQuery version that’s loaded by WordPress:
For one reason, we test all releases with that version of jQuery and cannot guarantee compatibility with other jQuery versions (neither older nor newer versions).
Also, many WordPress core features, Divi and other plugins rely on the jQuery version that ships with WordPress and might also fail.
If you use a different jQuery version, you should pay attention to not overwrite the global jQuery
object, e.g. by using some code like this:
<script>
// Create a backup-alias of the core "jQuery" variable,
// before loading your custom version.
window.jQuery_core = window.jQuery;
</script>
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js”></script>
<script>
// Move your custom jQuery to the global variable "jQuery360"
window.jQuery360 = jQuery.noConflict();
// Revert the global "jQuery" variable to the core version of jQuery
window.jQuery = window.jQuery_core;
// Test, if everything worked (only for testing, remove it later):
console.log('Core jQuery (should be 3.5.1) →', jQuery.fn.jquery);
console.log('Custom jQuery (should be 3.6.0) →', jQuery360.fn.jquery);
// Usage: jQuery('.something') → uses the core WP jQuery version
// Usage: jQuery360('.something') → uses the custom jQuery version
</script>
I hope that helps you to solve the compatibility issue for now. As mentioned, we will fix the compatibility issue that I’ve found on your website today, but we will not do any in-depth tests with jQuery 3.6.0 until it’s included in WordPress core.
Good luck and happy Popup-ing ?? Philipp
-
This reply was modified 3 years, 8 months ago by Philipp Stracker. Reason: added more explanation to the sample code