# Слайдер

Слайдер - отличное дополнение для вашего сайта, когда необходимо показать специальные акции или другое интересное содержимое, которое может быть не только изображением, но и любым другим контентом.

```html
<div id="slider-1"></div>
<script>
    $(function(){
        $('#slider-1').slider({
            'slides': [
                '<div class="slider-slide" style="background-image: url(img/pic/1.jpg);"></div>',
                '<div class="slider-slide">Some text</div>',
                '<div class="slider-slide" style="background-image: url(img/pic/3.jpg);"></div>'
            ]
        });
    });
</script>
```

{% embed url="<https://codepen.io/pipui/pen/jOpywra>" %}
Пример работы кода выше
{% endembed %}

Вы можете назначить объект .slider() переменной и управлять им через эту переменную, выставляя настройки во время выполнения скрипта.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://v1-6-0.pipui.ru/components/slider.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
