StructureJS
0.15.2A class based utility library for building modular and scalable web platform applications. Features opt-in classes and utilities which provide a solid foundation and toolset to build your next project.
A helper class to create multiple instances of the same Component Class from jQuery object that has one or more elements in it.
_createComponent
()
private
Helper method to create the component.
create
$element
ComponentClass
[scope=null]
Takes a jQuery object that has one or more elements in it and passes a single jQuery element into the constructor of the class that is also being passed in.
$element
JQuery
One or more jQuery referenced DOM elements.
ComponentClass
Any
The class that you want instantiated.
[scope=null]
DisplayObjectContainer
optional
This scope (parent object) is needed to instantiate the component/view with the use of the addChild method.
Returns a list of instantiated components/views so you can manage them within the Class that created them.
ComponentFactory.create($('.js-list'), SomeClass, this);