AnsweredAssumed Answered

JQueryUI and KendoUI don't work in Web AppBuilder ?

Question asked by thecupps on Sep 30, 2015
Latest reply on Oct 20, 2017 by BradleyNeish

Super Simple sample of autocomplete using Jquery and KendoUI (free core)

works fine in sample... http://plnkr.co/edit/BBYXwehUX9cGIbmev2Tf?p=preview

 

but doesn't work in Web AppBuilder. (I've tried setting it up in postCreate and startup also)


Widget.html

 

   

Kendo UI Animal:  try A or B

   
   

jquery UI colors: try R or B            

 

Widget.js

 

define(['dojo/_base/declare', 'jimu/BaseWidget'],
function(declare, BaseWidget) {
  return declare([BaseWidget], {
    
    baseClass: 'jimu-widget-demo',


    postCreate: function() {
      this.inherited(arguments);
      console.log('postCreate');
    },

    startup: function() {
        this.inherited(arguments);

      console.log('startup');
    },


    onOpen: function(){
        console.log('onOpen');

        if ($("#autocomplete1").autocomplete !== undefined) {
            $("#autocomplete1").autocomplete({
                source: ["red", "blue", "green"]
            });
        }


        if ($("#animal").autocomplete !== undefined) {
            $("#animal").kendoAutoComplete({
                dataSource: ["Ant", "Antelope", "Badger", "Beaver", "Bird"],
                change: function () {
                    alert("aA");
                }
            });
        }


    }
  
  });
});

Outcomes