When deferred, the Ecwid script will always append its widget markup inside a div to the end of the body element. Here is the code from the shop script:
Code:
if (window.ecwid_script_defer) {
var element = document.createElement("div");
element.innerHTML = html;
document.body.appendChild(element);
} else document.write(html);
In plain english this part means that if shop loading is deferred, then create a div, put the shop markup (
html variable) into it and append to body, and if shop loading was not deferred, insert it right in place immediately (
document.write() method call). Hence no option yet to defer loading and at the same time load the shop into some element.
Livequery hooks to the jQuery's own DOM manipulation methods to get notified of DOM changes. Since Ecwid does not rely on jQuery for DOM manipulation, the DOM change events are not fired for Livequery and hence it does not catch anything (also Livequery was considered obsolete since jQuery 1.4 or so, but nevertheless, it's not the matter).
There I've set up another version of your fiddle:
http://jsfiddle.net/Sjc8k/33/ where I don't rely on jQuery for manipulating the images, and they do not get added to the div (by the way, your original fiddle was tangled a bit, it added the images from JSON right into the place, where you were trying to move them on livequery, so it didn't actually illustrate that livequery works; here is jQuery based equivalent of my example, that illustrates that livequery works when I manipulate DOM with jQuery:
http://jsfiddle.net/Sjc8k/34/ ). There is the setup that makes your example totally work as you intended:
http://jsfiddle.net/Sjc8k/36/ .
So, livequery is possible as soon as you somehow (say, by the means of setInterval or using onhashchange event) call any of jQuery's DOM manipulation methods.