fluid.createDomBinder
fluid.createDomBinder(container, selectors)
Creates a new DOM Binder instance, used to locate elements in the DOM by name.
fluid.createDomBinder(container, selectors);
File name: Fluid.js
Parameters
container |
(Object) The root element in which to locate named elements. |
selectors |
(Object) A collection of named jQuery selectors |
Return Value
| Object | representing the [fluid:DOM Binder and containing all of its functions (i.e. locate, fastLocate, clear, and refresh) |
See Also
Notes
By default, any component created using one of the framework component initialization functions (fluid.initView, fluid.initLittleComponent, fluid.initRendererComponent, fluid.initSubcomponent) will have a DOM Binder automatically. If you use one of these functions, you no not need to call fluid.createDomBinder(). The DOM Binder will be attached to your that object as that.dom and its {{locate}} function will be accessible through that.locate().
Example
var selectors = {
addButton = ".add-button",
deleteButton = ".delete-button",
closeButton = ".close-button"
};
var domBinder = fluid.createDomBinder(containerEl, selectors);
In this example, domBinder will be a DOM Binder object, and will have locate, fastLocate, clear, and refresh functions.
, multiple selections available,