Get started with jquery.cycle2 CDN

MIT licensed

JQuery.cycle2: Popular plugin for creating slideshows, cycling content.

Tags:
  • slideshow
  • carousel
  • slider

Stable version

Copied!

How to start using jquery.cycle2 CDN


<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-cycle2/2.1.6/jquery.cycle2.css">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.cdnhub.io/jquery.cycle2/2.1.6/jquery.cycle2.min.js"></script>
    <style>
        #slideshow { width: 100%; height: 300px; }
        #slideshow img { width: 100%; height: 100%; }
    </style>
</head>
<body>
    <div id="slideshow">
        <img src="image1.jpg" />
        <img src="image2.jpg" />
        <img src="image3.jpg" />
    </div>
    <script>
        $(function() {
            $('#slideshow').cycle({
                fx: 'fade', // Choose your transition effect
                timeout: 3000 // Set the time between slides (ms)
            });
        });
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions