View Single Post
Old 10-26-2015, 11:54 PM
ukcfacademy's Avatar
ukcfacademy ukcfacademy is offline
Junior Member
Join Date: Oct 2015
Posts: 2
Default Is it possible to Call xSingleProduct() widget on click?

Hi all,

I am attempting to postpone the load of ECWID until I activate the div in which it is stored, and generally gain more control over when the xSingleProduct() widget is loaded.

Currently, if I call the function xSingleProudct() in line in a script tag, as the documentation states, it all works fine.

However if I call the function after the page finished loading (e.g. on click, or on $(document).ready(...) ). then it replaces the entire contents of the page with:

<body><div id="SingleProduct-1"></div></body>


Is there a way to do something like this or is there some kind of obvious scope issue I am missing here?

Many thanks!