The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
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>

jsfiddle: https://jsfiddle.net/Lgxn8v3c/1/

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

Many thanks!
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Tags
on click, single product widget, xsingleproduct

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:13 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.