Simple jquery carousel. How to create a carousel using only HTML and CSS

Owl Carousel- jQuery touch-enabled plugin that allows you to create a responsive (responsive) slider (carousel).
This is a very user-friendly, simple and responsive plugin for creating sliders, carousels, etc.
In this article I will try to explain and show you how it works.

Installing the Owl Carousel Plugin
First, we need to download the archive with the plugin

Below I will show an example of installing a plugin into the DataLife Engine template.


After we have downloaded the archive, open it and distribute the files as follows:
File owl.carousel.css and owl.transitions.css put in the folder style so or css.
File owl.carousel.js put in the js folder

Now we need to connect these files in order for them to work in our template.
Opening the file main.tpl a before the line we enter following lines:
Folder css change to the one in which you have css styles!
Then at the very bottom before the line we enter the following line:
That's it! We're done with the installation.

Now we need to insert and configure the slider itself.
I will show with an example topnews those will display popular news through our owl carousel.

The documentation page describes all the options, demos, and how to use our Owl Carousel plugin.
Follow the link and select any slider you like.
For ours topnews I chose the very first one with the name Images. In the javascript tab, copy these lines:
$ (document) .ready (function () ($ ("# owl-demo"). owlCarousel ((autoPlay: 3000, items: 4, itemsDesktop:, itemsDesktopSmall:));)); and insert them in the file main.tpl before the line

Then, in the CSS tab, copy the lines:
# owl-demo .item (margin: 3px;) # owl-demo .item img (display: block; width: 100%; height: auto;) and include them in any css file or file main.tpl before the line but after the line !
Now we will parse our HTML code and connect it to topnews. In file main.tpl insert the tag in the right place (topnews) which in turn displays a list of popular news, appearance which can be configured in the file topenews.tpl, more on this below .
Our tagged code should look like this:

(topnews)
Well, now it remains for us to configure the news itself.
Opening the file topnews.tpl and at the very beginning we enter:
at the very end we close the attribute

If you are using one of my templates with Bootstrap then as an option you can use the following lines in the file topnews.tpl:

(title limit = "55")

(text limit = "100")

To read

News will be displayed as follows

This plugin can be used almost anywhere, as well as using the tag (custom category)
It can also replace the standard DLE gallery, I will publish a separate article about this. Use it for health;)

Regards admin. download Attention: The download limit has been reached. Come tomorrow =)

1.jQuery clickCarousel

Block with scrolling news announcements. Left / right arrows are used to scroll through the blocks. The archive contains a carousel in two styles: light and dark.

1.jQuery carousel plugin "carouFredSel"

A neat fresh jQuery image carousel.

4. jQuery Plugin: Elastislide Carousel

5. Plugin "TinyCarousel"

Great content sliders in the form of a carousel of images using jQuery. The demo page describes how to attach this carousel to your site.

Slider Kit plugin, lightweight carousel with different ways scrolling.

7.javascript carousel

8. jQuery plugin "Grid Navigation Effects"

Original navigation between thumbnails of images. To view the effect on the right side of the demo page, click the Up and Down buttons. This jQuery solution also provides an effect on thumbnail hover and mouse wheel scrolling.

9. Light carousel

10. Carousel from Easy Paginate blocks

jQuery plugin "Easy Paginate". Each rectangular block represents a regular list item li, and if there are more than three items, then to view all of them, you need to use a slider-like navigation (using the "forward", "backward" arrows and using the navigation buttons at the bottom).

11. Vertical rotator "Vertical Ticker"

JQuery vertical rotator: automatic scrolling of content on a page. Navigation buttons are provided, as well as the ability to stop the rotation and start it again. When you hover over the mouse, the movement stops. At the level of HTML markup, scrolling blocks are represented by regular li list items.

12.javascript css scrollable area

javascript "TinyScroller" solution to create a scrollable area wrapped in a DIV container.

13. jQuery plugin "Smooth Div Scroll"

Plugin for implementing horizontal scrolling of content in a specific area. When you hover the mouse cursor over the left or right edge of the area, scrolling begins.

Navigation between content slides can be done using arrows or by clicking on a thumbnail. At the bottom there is a "Show" button that allows you to hide / show thumbnails or Full description slide.

15. Circular Content Carousel Content Rotator

17. Scroller

A block with a scroller that appears on hover. You can scroll through the content using either the scroll bar or the mouse wheel.

This jQuery solution was inspired by a similar effect on Apple's website. The developers of this corporation have always found interesting solutions that inspired webmasters from all over the world. To demonstrate the plugin, select from any category from the list.

19. Awesome slider

The slider is generated automatically. The data with the product name, description, link and image address is taken from the slider.db.txt file. Technologies used: CSS, PHP, jQuery.

20. Rotating blocks using jQuery

To see the effect of block rotation, click on one of the small rectangles on the demo page

A content scrolling plugin, for example, can be used to show the latest news or to show Twitter flyers on a site.

22. Dynamic block "Customer reviews"

Automatic rotation of the content of the block. Technologies used: PHP, XML, CSS, jQuery.

This plugin converts list items (ul li) to jQuery elements carousel.

26. javascript ImageFlow carousel

The images are easy to scroll with the mouse wheel.

27. Scrolling content

A compact block with the announcement of the latest materials on the site or news. The left column displays a paginated list of short announcements of the latest news. When you select one of them, more than detailed description and a link to read the full text of the publication. Implemented with jQuery.

Images with links are scrolled, on mouse hover the scrolling stops and the navigation bar appears. When you hover the mouse over the picture, its name is also displayed between the control buttons. Looks very nice on the page

33. Scrolling content, Mootools plugin "Scrollbar"

Scrolling is carried out both with the scroll bar and with the mouse wheel.

Yes, the topic is pretty hackneyed. But still, finding what you really need is often difficult. All offer highly sophisticated scripts, with a lot of unnecessary functionality. And usually these are already compressed plugins.

So I will offer mine Alternative option a very simple jQuery carousel.

It can be used as a carousel of images, as well as a carousel of news or any other content =)

The only little bells and whistles I allowed myself were the shadow at the carousel block.

UPD: 07/06/2014

It will look something like this:
DEMO Download

The structure will look like this:

TJ simple adaptive carusel

Let's describe the styles:

Carousel (max-width: 1080px; / * width of the whole block * / margin: 50px auto; width: 100%;). Carousel-wrapper (margin: 10px 30px; / * padding for arrows * / overflow: hidden; / * hide content outside the main area * / position: relative;). carousel-items (width: 10000px; / * set a larger width for the set of items * / position: relative; / * position the box relative to the main carousel area * /). carousel -block (float: left; / * arrange all carousel elements in a row * / width: 250px; / * set the width of each element * / padding: 10px 10px 10px 0px; / * make gaps so that the elements do not merge * /) .carousel -block img (display: block;) / *********** BUTTONS *********** / .carousel-button-left a, .carousel-button-right a ( width: 25px; height: 36px; position: relative; top: 80px; cursor: pointer; text-decoration: none;) .carousel-button-left a (float: left; background: url (../ images / carousel- left.png);) .carousel-button-right a (float: right; background: url (../ images / carousel-right.png); ) / *********** SHADOW *********** / .shadow (box-shadow: 0px 0px 10px rgba (0, 0, 0, 0.6);)

And finally, how it should work:

// Handle right arrow click $ (document) .on ("click", ".carousel-button-right", function () (var carusel = $ (this) .parents (". Carousel"); right_carusel (carusel ); return false;)); // Handle left arrow click $ (document) .on ("click", ". Carousel-button-left", function () (var carusel = $ (this) .parents (". Carousel"); left_carusel (carusel ); return false;)); function left_carusel (carusel) (var block_width = $ (carusel) .find (". carousel-block"). outerWidth (); $ (carusel) .find (". carousel-items .carousel-block"). eq (- 1) .clone (). PrependTo ($ (carusel) .find (". Carousel-items")); $ (carusel) .find (". Carousel-items"). Css (("left": "-" + block_width + "px")); $ (carusel) .find (". carousel-items .carousel-block"). eq (-1) .remove (); $ (carusel) .find (". carousel-items" ) .animate ((left: "0px"), 200);) function right_carusel (carusel) (var block_width = $ (carusel) .find (". carousel-block"). outerWidth (); $ (carusel) .find (".carousel-items"). animate ((left: "-" + block_width + "px"), 200, function () ($ (carusel) .find (". carousel-items .carousel-block"). eq (0) .clone (). appendTo ($ (carusel) .find (". carousel-items")); $ (carusel) .find (". carousel-items .carousel-block"). eq (0) .remove (); $ (carusel) .find (". carousel-items"). css (("left": "0px"));));) $ (function () (// Uncomment the line below to enable automatic scrolling of the carousel auto_right (". carousel: first");)) // Automa scrolling function auto_right (carusel) (setInterval (function () (if (! $ (carusel) .is (". hover")) right_carusel (carusel); ), 3000)) // Move the cursor over the carousel $ (document) .on ("mouseenter", ".carousel", function () ($ (this) .addClass ("hover"))) // Remove the cursor from the carousel $ (document) .on ("mouseleave", ".carousel", function () ($ (this) .removeClass ("hover")))

Accordingly, the shade can be removed. And to use it, you just need to replace the size of the main block and nested "scrolling" blocks in css. It is also very easy to loop this process so that it scrolls automatically (in this case, just uncomment the call to the auto_right function). That is, you can make everything from this simple gallery that is needed within the framework of the task!

It should also be noted that when the given example is adaptive, that is, the size of the carousel is adapted in accordance with the size of the screen and will be correctly displayed both on the screen of a computer or laptop, as well as on the screens of tablets and smartphones.

Currently, the slider - carousel - functionality that you just need to have on a website for a business, a website - portfolio or any other resource. Along with full screen image sliders, horizontal carousel sliders fit well into any web design.

Sometimes the slider should take up one third of the site page. Here the carousel slider is used with transition effects and responsive layouts. E-commerce sites use a carousel slider to showcase multiple photos in individual posts or pages. The slider code can be freely used and changed according to your needs.

By using jQuery in conjunction with HTML5 and CSS3, you can make your pages more interesting by providing them with unique effects and draw the attention of visitors to a specific area of ​​the site.

Slick - modern slider plugin - carousel

Slick is a free jquery plugin whose developers claim that their solution will satisfy all your slider requirements. The responsive carousel slider can work in tile mode for mobile devices, and in drag-and-drop mode for the desktop version.

Contains a transition effect "fade", an interesting feature "mode in the center", lazy loading of images with auto-scrolling. The updated functionality includes adding slides and a slide filter. Everything so that you can customize the plugin according to your requirements.

Demo Mode | Download

Owl Carousel 2.0 - jQuery - touch-friendly plugin

This plugin has a wide range of features in its arsenal, suitable for both beginners and experienced developers. it updated version slider - carousel. His predecessor was named exactly the same.

The slider contains some built-in plugins to improve the overall functionality. Animation, video playback, slider autoplay, lazy loading, automatic correction heights - the main features of Owl Carousel 2.0.

Support capabilities drag and drop is included for more convenient use of the plugin on mobile devices.
The plugin is perfect for displaying large images even on small screens of mobile devices.

Examples | Download

jQuery Silver Track Plugin

Quite small, but rich in functionality jquery plugin that allows you to place a slider on the page - a carousel that has a small core and does not consume a lot of site resources. The plugin can be used to display vertical and horizontal sliders, animations and create sets of images from the gallery.

Examples | Download

AnoSlide - Ultra compact responsive jQuery slider

Ultra compact jQuery slider- carousel, the functionality of which is much more than that of a regular slider. They include preview single image, display multiple images in a carousel and title-based slider.

Examples | Download

Owl Carousel - Jquery Slider - Carousel

Owl carousel - slider with support for touch screens and drag technology and drop, easily embeddable into HTML code. The plugin is one of the best sliders that allows you to create beautiful carousels without any specially prepared markup.

Examples | Download

3D gallery - carousel

Uses 3D transitions based on CSS styles and some Javascript code.

Examples | Download

3D carousel using TweenMax.js and jQuery

Great 3D carousel. It looks like this is still a beta version, because I discovered a couple of problems with it right now. If you are interested in testing and creating your own sliders, this carousel will be of great help.

Examples | Download

Carousel using bootstrap

Responsive carousel slider using bootstrap technology just right for your new website.

Examples | Download

Based on Bootstrap - Moving Box carousel slider framework

Most requested on portfolio and business sites. This type of carousel slider is often found on any type of site.

Examples | Download

Tiny Circleslider

This tiny slider is ready to work on devices with any screen resolution. The slider can work in both circular and carousel modes. Tiny circle is presented as an alternative to other similar sliders. There is built-in support operating systems IOS and Android.

In circular mode, the slider looks pretty interesting. The drag and drop support and the automatic slide scrolling system are excellently implemented.

Examples | Download

Thumbelina Content Slider

Powerful, responsive, carousel slider is perfect for a modern website. Works correctly on any device. Has horizontal and vertical modes. Its size is minimized to just 1 KB. The ultra compact plugin also has excellent smooth transitions.

Examples | Download

Wow - slider - carousel

Contains over 50 effects that can help you create an original slider for your website.

Examples | Download

Responsive jQuery content slider bxSlider

Resize the browser window to see how the slider adapts. Bxslider comes with over 50 customization options and showcases its features with various transition effects.

Examples | Download

jCarousel

jCarousel is a jQuery plugin that will help you organize your image preview. You can easily create custom image carousels from the base shown in the example. The slider is responsive and optimized to work on mobile platforms.

Examples | Download

Scrollbox - jQuery plugin

Scrollbox is a compact plugin for creating a slider - carousel or text scrolling line. Key features include vertical and horizontal scrolling with pause on mouse over.

Examples | Download

dbpasCarousel

Simple slider - carousel. If you need a fast plugin, this one will do 100%. Comes only with the basic functions required for the slider to work.

Examples | Download

Flexisel: Responsive JQuery Slider Plugin - Carousel

The creators of Flexisel took inspiration from the old school jCarousel plugin, making a copy of it focused on the correct operation of the slider on mobile and tablet devices.

The responsive layout of Flexisel, when working on mobile devices, differs from the layout oriented to the size of the browser window. Flexisel is perfectly adapted to work on screens, both low and high resolution.

Examples | Download

Elastislide - responsive slider - carousel

Elastislide adapts perfectly to the screen size of the device. You can set the minimum number of images to display at a specific resolution. Works well as an image gallery carousel slider, using a fixed wrapper in conjunction with a vertical scrolling effect.

Example | Download

FlexSlider 2

Freely redistributable slider from Woothemes. It is considered one of the best responsive sliders. The plugin contains several templates and will be useful for both novice users and experts.

Example | Download

Amazing carousel

Amazing Carousel - responsive slider images with jQuery. Supports many site management systems such as WordPress, Drupal and Joomla. Also supports Android and IOS and desktop operating systems without any compatibility issue. The built-in amazing carousel templates allow you to use the slider in vertical, horizontal and circular modes.

Examples | Download

Plugins jQuery-carousels allow you to display the content of websites in a more attractive way. With the help of such plugins, you can create beautiful presentations right on site pages and attract the attention of visitors.

1. Bootstrap Ambilight Slider

Bootstrap Ambilight Slider- plugin for creating sliders / carousels with ambient glow effect and Bootstrap functionality.

2.jQuery TouchSwipe Carousel


jQuery-plugin Touchswipe carousel allows you to detect touches on the touch screen and simulate a mouse button press.

3. ItemSlide


ItemSlide.js represents jquery-A plugin to create a carousel that will work on both desktop PCs and mobile touch devices.

4.


jquery-plugin for creating responsive carousels / sliders.

5.


Fully responsive and mobile optimized plugin jquery-carousels. For animation, here are used CSS3-transitions, but there is also a fallback for jQuery... The plugin supports an unlimited number of slides with any type of content. knows how to interact with the keyboard, and at the same time works well in most browsers, including mobile ones.

6. SilverTrack


SilverTrackjQuery-plugin expandable. It consists of a small core, to which you can choose to connect convenient plugins.

7. Owl Carousel 2


Owl carousel 2- fully responsive carousel for jQuery / Zepto with support for touch screens.

8. UtilCarousel


UtilCarousel- plugin jQuery-carousel with smooth transitions implemented through hardware acceleration. It is fully responsive. Plugin supports touch screens, and it uses a three-dimensional CSS3-Animation with hardware acceleration. This will make the plugin look good on both desktop and mobile devices. To govern UtilCarousel can be done using touches, navigation or the mouse wheel.

9. Slick


Slick is an adaptive jQuery-carousel, which has everything you might need.

10. CodingJack 3D Carousel


This carousel is supported by devices on iOS and Android and is equipped with the functionality of touch swiping. Looks great on tablets and smartphones.

11.jQuery Slideshow


jQuery Slideshow is a carousel and slider with support for gesture control on touch devices. The plugin archive weighs only 2 kilobytes.

12. FlimRoll


FlimRoll- miniature jQuery-carousel, which focuses the user's attention on a specific object, placing it in the center of the screen.

13. Tikslus


Tikslus is completely responsive carousel on the jQuery with many functions and properties. And the high adaptability of the plugin allows you not to specify the size of the images. Also worth noting is the support for arbitrary animation based on CSS3-classes. Tikslus can be used with plugin Jquery mobile.

14. Scrollbox


Scrollbox- simple, miniature jQuery-plugin that turns lists into a carousel or creeping line.

15. Sky Touch Carousel


Sky touch carousel- plugin jQuery-carousel with a rich set of functions. The plugin is responsive, supports touch screens, and is fast and fluid. The settings allow you to change the look of the carousel using CSS.

16.


- flexible jQuery-plugin for creating slideshows or carousels. It has many settings, including transition types, image alignment, and frame rate.