<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Custom Widget - Multiple Define - jquery in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-widget-multiple-define-jquery/m-p/1126887#M75623</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In the WAB Developer edition, in the samplewidgets folder, there is a sample for jquery.&amp;nbsp; I copied the example into my custom widget and it resulted in a&amp;nbsp; 'multiple define' error in Edge developer tools. Removing jquery from 'define'&amp;nbsp; in my widget resolved the 'multiple define' error, and as far as I can tell, jquery still works in my widget.&lt;/P&gt;&lt;P&gt;Is jquery already being loaded in at the app level somewhere?&amp;nbsp;The app is using the 'dashboard theme' and besides the widget there is no other customization. I have not explicitly included jquery anywhere else in the app.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrackstonLand_0-1639683570970.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/29881iBDDFFBB19D2E3C80/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BrackstonLand_0-1639683570970.png" alt="BrackstonLand_0-1639683570970.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;define([
// dojo required modules
    "dojo/_base/declare",
    'dojo/_base/lang',
    "dojo/_base/array",
    "dojo/store/Memory",
// jimu required modules
    "jimu/BaseWidget",
    'jimu/loaderplugins/jquery-loader!https://code.jquery.com/jquery-git1.min.js',
    'jimu/dijit/Message',
// dgrid required modules
    "dgrid/OnDemandGrid",
    "dgrid/Selection",
    "dgrid/editor",
// esri required modules
    'esri/tasks/query',
    'esri/tasks/QueryTask',
    "esri/layers/FeatureLayer",
    'esri/graphic',
    'esri/Color',
    'esri/symbols/SimpleMarkerSymbol',
    'esri/symbols/SimpleLineSymbol',
// dijit required modules
    "dijit/form/Select",
    'dijit/_WidgetsInTemplateMixin',
    "dijit/layout/ContentPane"
  ],
  function (
// dojo required modules
    declare,
    lang,
    arrayUtils,
    Memory,
// jimu required modules
    BaseWidget,
    $,
    Message,
// dgrid required modules
    Grid,
    Selection,
    editor,	
// esri required modules
    Query,
    QueryTask,
    FeatureLayer,
    Graphic,
    Color,
    SimpleMarkerSymbol,
    SimpleLineSymbol,
// dijit required modules
    Select,
    _WidgetsInTemplateMixin

  ) {
	  
	  
    var clazz = declare([BaseWidget, _WidgetsInTemplateMixin], {&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Dec 2021 19:57:09 GMT</pubDate>
    <dc:creator>B-L</dc:creator>
    <dc:date>2021-12-16T19:57:09Z</dc:date>
    <item>
      <title>Custom Widget - Multiple Define - jquery</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-widget-multiple-define-jquery/m-p/1126887#M75623</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In the WAB Developer edition, in the samplewidgets folder, there is a sample for jquery.&amp;nbsp; I copied the example into my custom widget and it resulted in a&amp;nbsp; 'multiple define' error in Edge developer tools. Removing jquery from 'define'&amp;nbsp; in my widget resolved the 'multiple define' error, and as far as I can tell, jquery still works in my widget.&lt;/P&gt;&lt;P&gt;Is jquery already being loaded in at the app level somewhere?&amp;nbsp;The app is using the 'dashboard theme' and besides the widget there is no other customization. I have not explicitly included jquery anywhere else in the app.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrackstonLand_0-1639683570970.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/29881iBDDFFBB19D2E3C80/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BrackstonLand_0-1639683570970.png" alt="BrackstonLand_0-1639683570970.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;define([
// dojo required modules
    "dojo/_base/declare",
    'dojo/_base/lang',
    "dojo/_base/array",
    "dojo/store/Memory",
// jimu required modules
    "jimu/BaseWidget",
    'jimu/loaderplugins/jquery-loader!https://code.jquery.com/jquery-git1.min.js',
    'jimu/dijit/Message',
// dgrid required modules
    "dgrid/OnDemandGrid",
    "dgrid/Selection",
    "dgrid/editor",
// esri required modules
    'esri/tasks/query',
    'esri/tasks/QueryTask',
    "esri/layers/FeatureLayer",
    'esri/graphic',
    'esri/Color',
    'esri/symbols/SimpleMarkerSymbol',
    'esri/symbols/SimpleLineSymbol',
// dijit required modules
    "dijit/form/Select",
    'dijit/_WidgetsInTemplateMixin',
    "dijit/layout/ContentPane"
  ],
  function (
// dojo required modules
    declare,
    lang,
    arrayUtils,
    Memory,
// jimu required modules
    BaseWidget,
    $,
    Message,
// dgrid required modules
    Grid,
    Selection,
    editor,	
// esri required modules
    Query,
    QueryTask,
    FeatureLayer,
    Graphic,
    Color,
    SimpleMarkerSymbol,
    SimpleLineSymbol,
// dijit required modules
    Select,
    _WidgetsInTemplateMixin

  ) {
	  
	  
    var clazz = declare([BaseWidget, _WidgetsInTemplateMixin], {&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 19:57:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-widget-multiple-define-jquery/m-p/1126887#M75623</guid>
      <dc:creator>B-L</dc:creator>
      <dc:date>2021-12-16T19:57:09Z</dc:date>
    </item>
  </channel>
</rss>

