Welcome to TalkGraphics.com
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Oct 2011
    Location
    Vancouver, WA
    Posts
    102

    Default Re: Full width header image cycle on refresh

    Quote Originally Posted by Acorn View Post
    Here is a simple approach.

    I have added a random element to my Simple Carousel Widget.
    1. You you need to do is place the Widget on the page.
    2. Place a number of images, shapes or text on the page and add a special Name of htmlclass="illy" to them.
    3. If you are after a full width carousel, then add stretch to the images. Shapes work too, as in my demo, you could stretch the characters, noting them are Shapes not Text as text will not stretch.

    Each visit to the holding page returns a random image. If you are "unlucky", it could be the same image several times but for 3 to 4 images this is quite likely.

    After the image is shown for 8 seconds, another is picked and so you get a random carousel.
    If you only every want one image, increase the 8 seconds to a stupidly large number: 300000 milliseconds (five minutes).

    JS - Random Carousel.xar.


    Placeholder HTML Body (code):
    Code:
    <script>
    $(document).ready(function(){
    
    
    (function fade(idx) {
      var $illy = $('.illy');
      $illy.hide();
      idx = Math.floor(Math.random() * $illy.length);
      $illy.eq(idx).fadeIn(1000).delay(8000).fadeOut(1000, function () {
        fade(idx + 1 < $illy.length ? idx + 1 : 0);
      });
    }(0));
    
    
    });
    
    
    </script>
    I think this on just might do it. I assume you just stack the images on top of each other?

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,902

    Default Re: Full width header image cycle on refresh

    Quote Originally Posted by edmiston99 View Post
    I think this on just might do it. I assume you just stack the images on top of each other?
    As you are stretching them, ideally all that is needed is they are the same height and aligned vertically.
    If you apply Full Width & Scaled to my example file, you will get giant letter fragments but each is now fully stretched the width of the browser. It is clearer with images but I considered the file size of the example should be kept small.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  3. #3
    Join Date
    May 2002
    Location
    Canada
    Posts
    3,345

    Default Re: Full width header image cycle on refresh

    I used them for a client but now I wonder if websites created in 2020 will need header sliders. They just slow down the site to me. A nice picture will do the job.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •