Scripts not initialized due to DOMContentLoaded vs jQuery.ready execution order
-
jQuery v3 (added in WP 5.5) has different execution order of
jQuery.ready
vsDOMContentLoaded
compared to jQuery v2 and v1 (used in WP < 5.5)
see https://jquery.com/upgrade-guide/3.0/#breaking-change-document-ready-handlers-are-now-asynchronous
Which breaks dsIDXpress plugin in WP < 5.5 as IDX page content (returned from API) haswindow.addEventListener('DOMContentLoaded', function () { dsidx.activate('details'); // etc });
while using
jQuery(function(){...})
in https://api-idx.diversesolutions.com/combo-js?config=dsidxpress-pro&ver=3.14.0 which makes all thosedsidx.activate(..)
run after the ready function in combo-js, resulting in empty activated modules and broken all IDX pages/search etc.
- The topic ‘Scripts not initialized due to DOMContentLoaded vs jQuery.ready execution order’ is closed to new replies.