🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #51634

Slider z podpisami

#51634
From: Michal M. Lechanski
Date: Wed, 30 Dec 2015 18:48
46 lines
2343 bytes
Znalazłem taki slider (http://snipplr.com/view/59060/):

    <html>
    <head>
        <title>Sliding Images</title>
        <script type="text/javascript">
            //Create images Array
            var imgArr = new Array("images/img1.jpg",
                        "images/img2.jpg",
                        "images/img3.jpg");

            var count = imgArr.length; // assign images array length
            var position = 0; //position is set to zero

            function slidingImages() {
                if ( document.images ) {
                    if ( position < count ) {
                        imageSrc(position); // call the image source
                        position += 1;
                    } else {
                        position = 0;
                        imageSrc(position);
                    }
                }
                setTimeout(slidingImages, 3000);
            }

            function imageSrc(position) {
                document.banner.src = imgArr[position];
            }
        </script>
    </head>
    <body onload="slidingImages()">
        <img src="images/img1.jpg" name="banner"/>
    </body>
    </html>

Dla moich potrzeb jest niemal idealny - brak mu tylko możliwości
wyświetlania podpisu pod poszczególnymi obrazkami.

Niestety nie potrafię takiej funkcji sam dodać. Pomożecie?
Z góry bardzo dziękuję.

-- 
The Mis'
Technical Details
Message-ID: <n618th$pti$1$michal@news.chmurka.net>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!news.chmurka.net!.POSTED.alhuston.plus.com!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!news.chmurka.net!.POSTED.alhuston.plus.com!not-for-mail
From: "Michal M. Lechanski" <michal@doriath.eu>
Newsgroups: pl.comp.lang.javascript
Subject: Slider z podpisami
Date: Wed, 30 Dec 2015 18:48:17 +0000
Organization: news.chmurka.net
Message-ID: <n618th$pti$1$michal@news.chmurka.net>
NNTP-Posting-Host: alhuston.plus.com
Mime-Version: 1.0
Injection-Date: Wed, 30 Dec 2015 18:48:17 +0000 (UTC)
Injection-Info: news.chmurka.net; posting-account="michal"; posting-host="alhuston.plus.com:81.174.137.13"; logging-data="26546"; mail-complaints-to="abuse-news.(at).chmurka.net"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.0
X-Mozilla-News-Host: news://news.chmurka.net:119
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit