Check documentation for the latest version of dhtmlxSuite Working with Cells DHTMLX Docs

Working with Cells

Adding/removing cells

To add a new cell into a carousel, use the method addCell.

myCarousel.addCell(id, index);

The parameters are:

  • id - id of the added cell
  • index - index of the added cell

You can also use an autogenerated cell id:

var id = myCarousel.addCell();

To remove a cell from Carousel, use the remove method:


Accessing cells

In order to work with carousel we need to get access to its items. For this purpose, you should use their ids which you defined with the addCell() method.

Items are referred to as cells. Thus, we can access any carousel's item in the following way:

var cell = myCarousel.cells(id);

The method will return the cell's object.

Back to top