File "slider-with-fixed-static-element.html"

Full path: E:/sites/Single15/tinmung2007/webroot/XAMMP/htdocs/WEB-Than-Huu-Hai-Ngoai/SliderShow/jssor.slider.devpack/examples/slider-with-fixed-static-element.html
File size: 3.35 KiB (3430 bytes)
MIME-type:
Charset: utf-8

Download   Open   Back

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Slider with Fixed Static Element - Jssor Slider</title>
</head>
<body style="font-family:Arial, Verdana;background-color:#fff;">
    <!-- Jssor Slider Begin -->
    <script type="text/javascript" src="../js/jssor.slider.min.js"></script>
    <script>
        jssor_slider1_init = function () {
            var options = {

                $AutoPlay: 1,                                   //[Optional] Auto play or not, to enable slideshow, this option must be set to greater than 0. Default value is 0. 0: no auto play, 1: continuously, 2: stop at last slide, 4: stop on click, 8: stop on user navigation (by arrow/bullet/thumbnail/drag/arrow key navigation)
                $DragOrientation: 1                                //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $Cols is greater than 1, or parking position is not 0)
            };

            var jssor_slider1 = new $JssorSlider$('slider1_container', options);

            function DisplayIndex(slideIndex, fromIndex) {
                var myFixedElement = $Jssor$.$GetElement("myfixedelement");
                myFixedElement.innerHTML = "";
                myFixedElement.appendChild(document.createTextNode(slideIndex + 1 + " of " + jssor_slider1.$SlidesCount()));
            }

            jssor_slider1.$On($JssorSlider$.$EVT_PARK, DisplayIndex);
        };
    </script>

    <!-- To move inline styles to css file/block, please specify a class name for each element. -->
    <div id="slider1_container" style="position: relative; top: 0px; left: 0px; width: 600px;
        height: 300px;">
        <!-- Slides Container -->
        <div data-u="slides" style="position: absolute; left: 0px; top: 0px; width: 600px; height: 300px;
            overflow: hidden;">
            <div><img data-u="image" src="../img/gallery/980x380/001.jpg" /></div>
            <div><img data-u="image" src="../img/gallery/980x380/002.jpg" /></div>
            <div><img data-u="image" src="../img/gallery/980x380/003.jpg" /></div>
            <div><img data-u="image" src="../img/gallery/980x380/004.jpg" /></div>
            <div><img data-u="image" src="../img/gallery/980x380/005.jpg" /></div>
            <div><img data-u="image" src="../img/gallery/980x380/006.jpg" /></div>
            <div><img data-u="image" src="../img/gallery/980x380/007.jpg" /></div>
            <div><img data-u="image" src="../img/gallery/980x380/008.jpg" /></div>
        </div>
        <!-- every element outside slides container is fixed/static element. -->
        <!-- reference: http://www.jssor.com/development/slider-with-fixed-static-element.html -->
        <div id="myfixedelement" style="position: absolute; top: 50px; left: 50px; width: 100px; height: 26px; background-color: #fff; user-select: none; -ms-user-select: none; -moz-user-select: none;">
        </div>
        <img src="../img/qr/jssor.com.png" style="position: absolute;bottom:8px;right:8px;width:80px;height:80px;opacity:.6;" />

        <!-- Trigger -->
        <script>
            jssor_slider1_init();
        </script>
    </div>
    <!-- Jssor Slider End -->
</body>
</html>

PHP File Manager