Adds an object to the end of the collection.
Namespace: MindFusion.Common.Collections
File: IEnumerable.js
JavaScript Copy Code |
---|
function add (item) |
Object. The object to add.
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")); var menuItem = new ui.MenuItem("Start", "index.html"); |