- This topic is empty.
-
AuthorPosts
-
October 18, 2011 at 3:45 pm #34814
mblaustein
MemberI 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.
October 18, 2011 at 3:47 pm #89249mblaustein
MemberBy the way, here is the site:
October 18, 2011 at 4:50 pm #89252Mottie
MemberHi 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.
October 18, 2011 at 5:43 pm #89256mblaustein
MemberThank 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?
October 18, 2011 at 6:54 pm #89261Mottie
MemberIf 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).
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.