MindFusion.Charting for JavaScript Programmer's Guide
IEnumerable.add Method
See Also
 






Adds an object to the end of the collection.

Namespace: MindFusion.Common.Collections
File: IEnumerable.js

 Syntax

JavaScript  Copy Code

function add (item)

 Parameters

item

Type: Object
Object. The object to add.

 Example

The following sample creates a new instance of the Menu class and adss one MenuItem to it. The items collection of the Menu class derives from IEnumerable.

JavaScript  Copy Code

var menu = new ui.Menu(document.getElementById("links"));
menu.loadOnDemand = true;

var menuItem = new ui.MenuItem("Start", "index.html");
menuItem.target = "_blank";
menu.items.add(menuItem);

 See Also

IEnumerable Members
IEnumerable Class
MindFusion.Common.Collections Namespace