# Owl Carousel 2 Thumbnails plugin (ok)

**Ví dụ 1:** [**https://codepen.io/aykutkapisiz/pen/POGJxg**](https://codepen.io/aykutkapisiz/pen/POGJxg)

<figure><img src="/files/hZVhYCqLJBkSSpzuAVVn" alt=""><figcaption></figcaption></figure>

C:\xampp81\htdocs\today\test.html

```
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="//code.jquery.com/jquery.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>
  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css" />
  <link rel="stylesheet" type="text/css" href="style.css">
  <script type="text/javascript" src="script.js"></script>
  <title>Document</title>
</head>

<body>
  <div id="sync1" class="owl-carousel owl-theme">
    <div class="item">
      <h1>1</h1>
    </div>
    <div class="item">
      <h1>2</h1>
    </div>
    <div class="item">
      <h1>3</h1>
    </div>
    <div class="item">
      <h1>4</h1>
    </div>
    <div class="item">
      <h1>5</h1>
    </div>
    <div class="item">
      <h1>6</h1>
    </div>
    <div class="item">
      <h1>7</h1>
    </div>
    <div class="item">
      <h1>8</h1>
    </div>
  </div>
  <div id="sync2" class="owl-carousel owl-theme">
    <div class="item">
      <h1>1</h1>
    </div>
    <div class="item">
      <h1>2</h1>
    </div>
    <div class="item">
      <h1>3</h1>
    </div>
    <div class="item">
      <h1>4</h1>
    </div>
    <div class="item">
      <h1>5</h1>
    </div>
    <div class="item">
      <h1>6</h1>
    </div>
    <div class="item">
      <h1>7</h1>
    </div>
    <div class="item">
      <h1>8</h1>
    </div>
  </div>
</body>

</html>
```

C:\xampp81\htdocs\today\style.scss

```
#sync1 {
  .item {
    background: #0c83e7;
    padding: 80px 0px;
    margin: 5px;
    color: #FFF;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    text-align: center;
  }
}
#sync2 {
  .item {
    background: #C9C9C9;
    padding: 10px 0px;
    margin: 5px;
    color: #FFF;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    text-align: center;
    cursor: pointer;
    h1 {
      font-size: 18px;
    }
  }
  .current .item{
    background: #0c83e7;
  }
}
.owl-theme {
  .owl-nav {
    [class*='owl-'] {
      transition: all .3s ease;
      &.disabled:hover {
       background-color: #D6D6D6;
      }   
    }
  }
}
#sync1.owl-theme {
  position: relative;
  .owl-next, .owl-prev {
    width: 22px;
    height: 40px;
    margin-top: -20px;
    position: absolute;
    top: 50%;
  }
  .owl-prev {
    left: 10px;
  }
  .owl-next {
    right: 10px;
  }
}
```

**Ví dụ 2:**

![](/files/-MAxgY0CgAI-Udccc_ug)

```
<!doctype html>
<meta charset=utf-8>
<meta name=description content="Enables thumbnail support for Owl Carousel 2.0">
<link rel=stylesheet href="http://localhost/library/owlcarousel2/normalize.css">
<link rel=stylesheet href="http://localhost/library/owlcarousel2/owl.carousel.min.css">
<link rel=stylesheet href="http://localhost/library/owlcarousel2/owl.theme.default.min.css">
<title>owl Carousel 2 Thumbnail Demo</title>
<style>
* {
  -webkit-box-sizing: border-box;
  /* Safari 3.0 - 5.0, Chrome 1 - 9, Android 2.1 - 3.x */
  -moz-box-sizing: border-box;
  /* Firefox 1 - 28 */
  box-sizing: border-box;
}

body,
html {
  height: 100%;
}

img {
  vertical-align: middle;
}

.owl-carousel {
  height: 100%;
}

.owl-carousel .owl-item,
.owl-carousel .item {
  height: 100vh;
}

.owl-carousel .owl-item img {
  transform-style: initial;
  height: 100%;
  object-fit: cover;
}

.owl-thumb-item img {
  width: 150px;
  height: auto;
}

.owl-thumbs {
  position: absolute;
  bottom: 0;
  left: 0;
  display: table;
  width: 100%;
  text-align: center;
  padding: 5%;
}

.owl-thumb-item {
  display: table-cell;
  border: none;
  background: none;
  padding: 0;
  opacity: .4;
}

.owl-thumb-item.active {
  opacity: 1;
}

.label {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #0a6cff;
  color: white;
  padding: 10px 20px;
  z-index: 5;
  text-align: center;
}
</style>
<a onClick="_gaq.push(['_trackEvent', 'download', 'download',,, true]);" href="https://github.com/gijsroge/OwlCarousel2-Thumbs" class="label">download on GitHub</a>
<div class="owl-carousel">
  <div class="item">
    <img src="https://unsplash.imgix.net/photo-1426200830301-372615e4ac54?fit=crop&fm=jpg&h=1080&q=75&w=1900" alt="photo by Barn Images">
  </div>
  <div class="item">
    <img src="https://ununsplash.imgix.net/photo-1423753623104-718aaace6772?fit=crop&fm=jpg&h=1080&q=75&w=1900" alt="photo by Joshua Earle">
  </div>
  <div class="item">
    <img src="https://ununsplash.imgix.net/photo-1421098518790-5a14be02b243?fit=crop&fm=jpg&h=1080&q=75&w=1900" alt="photo by Alexander Dimitrov">
  </div>
  <div class="item">
    <img src="https://unsplash.imgix.net/photo-1423439793616-f2aa4356b37e?fit=crop&fm=jpg&h=1080&q=75&w=1900" alt="photo by Wojciech Szaturski">
  </div>
  <div class="item">
    <img src="https://ununsplash.imgix.net/uploads/14127101912749510b8ed/82743738?fit=crop&fm=jpg&h=1080&q=75&w=1900" alt="photo by Kyle Szegedi">
  </div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="http://localhost/library/owlcarousel2/owl.carousel.min.js"></script> 
<script src="http://localhost/library/owlcarousel2thumbs/owl.carousel2.thumbs.min.js"> </script> <script>
var owl = $('.owl-carousel');
owl.owlCarousel({
  loop: true,
  items: 1,
  thumbs: true,
  thumbImage: true,
  thumbContainerClass: 'owl-thumbs',
  thumbItemClass: 'owl-thumb-item'
});
</script>
```

{% file src="/files/-MAxgtXAyMjqU9FHiyLj" %}


---

# 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://javascriptuse.gitbook.io/javascript/sticky-scroller/owl-carousel-2-thumbnails-plugin-ok.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.
