Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to add image that changes every few seconds

Featured Replies

Hi guys, I'm looking for a script to have like a "slideshow" of pictures.

 

Do you guys have a preferred script in order to achieve this? Please let me know. Thanks

There are tons of slideshow plugins. Assuming you're familiar with Javascript and JQuery, the following is what I usually use.

 

http://www.slidesjs.com/

 

Though if that doesn't fulfill your needs, have a look here:

 

http://vandelaydesign.com/blog/web-development/jquery-slideshow/

 

Regards

Edited by Pete Prosper

The below code is a snippet from what I use on my site to change fade in and out between id's at a specific number of intervals. It doesn't change the src of an image, but is easily done as well. This should give you the basis for what you need though. If you need more I can event comment the code for you explaining what each line does. This of course needs the jquery library.

<script type="text/javascript">
jQuery(document).ready(function() {
    var InfiniteRotator =
    {
        init: function()
        {
            var initialDelay = 2000;
            var initialFade = 3000;
            var intTime = 10000;
            var fadeTime = 2000;
            var currentItem = 1;
            var numberOfItems = 2;
            setTimeout(function() {$('#id'+currentItem).fadeIn(initialFade);}, initialDelay);
            var infiniteLoop = setInterval(function(){
                $('#promo'+currentItem).fadeOut(fadeTime);
                if (currentItem == numberOfItems) {currentItem = 1;} else {currentItem++;}
                setTimeout(function() {$('#id'+currentItem).fadeIn(fadeTime);}, fadeTime);
            }, intTime);
        }
    };
    InfiniteRotator.init();
});
</script>

Edited by Nullified

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.