-4

I'm looking at Infragistic's code from a sample page and they have the following jQuery statement that is confusing me:

<table id="grid">
$("#grid").igGrid({ "caption" : "This is a caption for the grid"});

I know that $("#grid") is selecting the table element, but what is .igGrid? It looks like it's assigning an object (igGrid) that contains properties (?), but how? How is .igGrid not flagged as an error?

Cid
  • 14,968
  • 4
  • 30
  • 45
milop
  • 5
  • 2
  • 4
    `igGrid` is the name of the jQuery method being called. It's non-standard so must have been explicitly included in your project. For your own reference, it's easy to create your own jQuery plugins: https://learn.jquery.com/plugins/basic-plugin-creation/ – Rory McCrossan Mar 12 '20 at 13:37
  • 2
    https://www.igniteui.com/help/iggrid-overview – j08691 Mar 12 '20 at 13:40
  • Ah, it's a plugin. Thank you. – milop Mar 12 '20 at 13:47

1 Answers1

0

It is not assigning any object, it is converting your table to DataGrid.
DataGrid(part of Ignite UI) is a jQuery plug-in like any other plug-ins e.g. DataTable, Steps etc.
This will add additional customizable features to your table. Follow the documentation here.
There must be a reference to Ignite UI js in this page.

as-if-i-code
  • 2,103
  • 1
  • 10
  • 19