Widget-Wrangler / ww

Widget Wrangler
21 stars 6 forks source link

Multiple widget on sharepoint Page #5

Open chahat-mca opened 7 years ago

chahat-mca commented 7 years ago

Hi ,

We are struck with a problem while using WW. we have a SharePoint Page in which we have multiple widgets. All widgets are developed using jquery. some widgets are using same resource like jquery.min.js. Problem is that some of the widgets don't render properly. if we remove the widgets and run individually everything works fine

Does WW supports multiple widgets on the same page?can you suggest a solution for this?

Thanks, Chahat

juliemturner commented 7 years ago

Hi Chahat,

Yes, the actual point of the widget wrangler is to help run multiple widgets on the page. If you are having errors when running them together but not when running them separately then there is likely code (functions or variables) that are not properly namespaced so the widgets are stepping on each other. The only way to tell this is to look at the browser's developer console (F12) and review the errors.

-Julie

BobGerman commented 7 years ago

Here is a sample of multiple jQuery widgets running on the same page. Note that the jQuery code is written to only work within the DOM element that contains each widget. Also, they both use the same path to load jQuery and other dependencies, so Widget Wrangler will only load them once across all widgets. Hope this helps!