EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: WizPS on November 07, 2020, 08:33:27 AM



Title: dialog as jquery popup function
Post by: WizPS on November 07, 2020, 08:33:27 AM
I'm looking for a way to make jquery popup filling it with text, datagrid or any easyui plugin content.

Code I want to write is:
Code:
using(['my_popup', 'datagrid','propertygrid'], function () {
   $.my_popup().datagrid({});
   $.my_popup().propertygrid({});
   $.my_popup().text({});
});

my_popup function looks like this:
Code:
(function ($) {
   jQuery.my_popup = function (opt) {
      using(['dialog'], function () {
         var ret = $('<div/>').dialog(opt);
      });
      return this;
   };
})(jQuery);
however it does not display the datagrid, propertygrid or text in the popup but says
$.my_popup(...).datagrid is not a function.
Please advice.


Title: Re: dialog as jquery popup function
Post by: sky-t on November 08, 2020, 01:29:48 PM
Hi WizPS,

maybe you have to parse the component after creating with

$.parser.parse(your component id, class, etc);


Greetings,

sky-t