Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS AnythingSlider Infinite Expansion

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #34814
    mblaustein
    Member

    I don’t know if this is a bug or a feature, but when I change expand to true on Anything Slider, the slider slowly grows from nothing from the top, and then begins to expand infinitely (I assume, although I have no way of testing this). Here is the code:

    $(function(){
    $('#slider')
    .anythingSlider({ // add any non-default options here
    theme : "minimalist-square",
    expand : false,
    resizeContents : true,
    buildArrows : true,
    buildNavigation : true,
    toggleArrows : true,
    autoPlay : true
    /* })
    .anythingSliderFx({
    // base FX definitions can be mixed and matched in here too.
    '.fade' : [ 'fade' ]*/
    });
    });

    As you can see, I commented out the fx animation, because I couldn’t get that to work at all. Maybe someone can comment on that as well, and any problems that code may have. Thank you.

    #89249
    mblaustein
    Member

    By the way, here is the site:

    Rare Culture

    #89252
    Mottie
    Member

    Hi mblaustein!

    To use the “expand” option, the slider needs to be inside of a container with a set width and height. So placing the slider so that the body is a direct parent would cause the same effect you are seeing. But in this case, which I haven’t verified, is because the div “homepage-meida” has a lot of padding at the bottom and no set height. This adds to the content height which changes each time the slider resizes to fit in that container. When I set the height to 359px (height of the images you are using), it stopped expanding.

    Also, since it appears that the page width isn’t really dynamic, it would be best to just not use the “expand” option.

    #89256
    mblaustein
    Member

    Thank you, Mottie. I am using the expand option because the caption underneath each slider may be one line or a few paragraphs. Is there any other way I could achieve this that you can see?

    #89261
    Mottie
    Member

    If you set the “resizeContents” option to false, you can then set a fixed width and different height for each panel. Then the slider will resize as seen on the main demo page (second demo).

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.