LinkGrid
Uses provided JSON data information to build an Insight LinkGrid section.
Method summary
name | description |
---|---|
display | Displays the LinkGrid. |
constructor
Constructor
Setup the LinkGrid component. You must call the display() method to display the grid of icons with links.
details
Example
examples
var grid = new insight.components.LinkGrid();
grid.display('link-grid-div-id', items);
Methods
- display ( id, items )
-
Displays the LinkGrid.
Parameters:
paramsName Type Description id typestringDOM id of DIV to add the LinkGrid to. items typeArray.<object>array of JSON strings comprising of the LinkGrid elements. Each element of the array contains: - {string} label - labels to display below the link grid thumbnail
- {string} description (optional) - description to display in the thumbnail hover text
- {string} url - full or relative url for the content
- {string} imageUrl (optional) - full or relative url to image to display as the thumbnail
- {string} type (optional) - content type used to determine the image url if one is not provided. Allowed values are; PDF, IMAGE, HTML, VIDEO.
detailsExample
examples
Back to Topvar grid = new insight.components.LinkGrid(); grid.display('link-grid-div-id', [ { label: 'FICO', url: 'http://google.com/q=FICO' }, { label: 'Google', url: 'http://google.com/' } ]);
method