Swipe.js Jump Start PRO

Swipe.js is one of the most popular JavaScript libraries that allow us to get a responsive slider in our web page.

The following code sample shows how simple it is to use this JavaScript library. It includes 4 images that were prepared in advance.

<!DOCTYPE html>
<html>
<head>
    <title>swipe.js demo</title>
    <script type="text/javascript" src="swipe.js"></script>
    <style>
        .swipe {
            overflow: hidden;
            visibility: hidden;
            position: relative;
        }
        .swipe-wrap {
            overflow: hidden;
            position: relative;
        }
        .swipe-wrap > div {
            float:left;
            width:100%;
            position: relative;
        }
    </style>
</head>
<body>
<h2>our simple swipe.js demo</h2>
<div id='ourslider' class='swipe'>
    <div class='swipe-wrap'>
        <div><img src="pix/pix1.jpg"></div>
        <div><img src="pix/pix2.jpg"></div>
        <div><img src="pix/pix3.jpg"></div>
        <div><img src="pix/pix4.jpg"></div>
        <div><img src="pix/pix5.jpg"></div>
    </div>
</div>
<script type="text/javascript">
    ob = new Swipe(document.getElementById('ourslider'), {
        startSlide: 4,
        speed: 500,
        auto: 3000,
        continuous: true
    });
</script>
</body>
</html>

The following video clip overviews this code sample, shows its execution and explains it step by step.

You can find more video clips, training material and code samples for learning how to use this library in my free online courses website at http://abelski.lifemichael.com.

Share:

The Visitor Design Pattern

The Visitor Design Pattern

The visitor design pattern allows us to add operations to objects that already exist without modifying their classes and without extending them.

What are Anti Patterns?

Anti Patterns

Unlike design patterns, anti patterns just seem to be a solution. However, they are not a solution and they cause additional costs.

Virtual Threads in Java Professional Seminar

Virtual Threads in Java

The use of virtual threads can assist us with improving the performance of our code. Learn how to use virtual threads effectively.

The Beauty of Code

Coding is Art! Developing Code That Works is Simple. Develop Code with Style is a Challenge!

Update cookies preferences