# Class: SliderControls

## SliderControls

#### new SliderControls(slider, userOptions)

  Controls of a slider

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `slider` | Slider |

  `userOptions`

  Object

  ###### Properties

  Name | Type | Argument | Default | Description
  --- | --- | --- | --- | ---
  `$btPrev` | HTMLElement | <optional> |  |
  `$btNext` | HTMLElement | <optional> |  |
  `$pagination` | HTMLElement | <optional> |  |
  `paginationItems` | String | <optional> |  |
  `autoslide` | Number | <optional> |  | In second
  `swipe` | Boolean | <optional> | false |
  `enableKeyboard` | Boolean | <optional> | false |
  `gestureOptions` | Object | <optional> |  | See gesture module options

  See:
    - extra/modules/slider.md

  ##### Example

      let controls = new SliderControls(
       slider,
       {
           "$btPrev": $previousButtton,
           "$btNext": $nextButton,
           "$pagination": $pagination,
           "paginationItems": '.item',
           "autoslide": 10, // in second
           "swipe": false,
           "enableKeyboard": true,
           "gestureOptions": Object
       }
      );

### Members

#### slider :Slider

  Controlled slider

  ##### Type:

  - Slider

### Methods

#### destroy()

  Destroy the slider and its controls

#### goTo(index [, $button])

  Go to the asked slide or page

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `index` | Number |  |
  `$button` | DOMElement | <optional> | Internal use

  ##### Returns:

  Type
    Promise

#### isEnabled()

  Check if the slider is enable or not

  ##### Returns:

  Type
    Boolean

#### next( [$button])

  Go to the next slide or page

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `$button` | DOMElement | <optional> | Internal use

  ##### Returns:

  Type
    Promise

#### previous( [$button])

  Go to the previous slide or page

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `$button` | DOMElement | <optional> | Internal use

  ##### Returns:

  Type
    Promise

#### startAutoslide()

  Start the autoslide

#### startAutoslide()

  Stop the autoslide

#### Search results