Data binding
The Essential JavaScript Mobile Rotator provides support for data binding. Data binding provides a simple and consistent way for applications to present and interact with data. Elements can be bound to data from a variety of data sources.
data-ej-datasource is used to get the datasource that holds the Rotator items. Refer to the following code example.
<div class="sample-control databinding rotator page">
<div id="databindrotator" data-role="ejmrotator" data-ej-targetid="rotatorcontentdatabinding" data-ej-datasource="window.imgdata">
</div>
</div>
<div id="rotatorcontentdatabinding">
<div class="e-m-rotator-image ">
</div>
</div>
Refer the below code snippets for script section
window.imgdata = [
{
imageurl: "image-bread",
},
{
imageurl: "image-card",
},
{
imageurl: "image-green",
},
{
imageurl: "image-tablet",
},
{
imageurl: "image-wheat",
}
];
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page