jquery - image carousel showing all images -
for flipping reason image carousel showing images @ once. don't know why think has css.
#full_image { overflow:hidden; position:absolute; } #full_image ul li img { width:100%; max-width:100%; list-style: none outside none; position: relative; overflow: hidden; } #full_image .full_close { background: url('icons/zoom-on.png') no-repeat; top: 10px; cursor: pointer; height: 29px; opacity: 1; position: absolute; width: 29px; z-index: 999; right: 10px; } #full_image .next_big { background: url('icons/arrow-right.png') no-repeat; top: 50%; cursor: pointer; height: 29px; opacity: 1; position: absolute; width: 29px; z-index: 999; right: 0px; } #full_image .prev_big { background: url('icons/arrow-left.png') no-repeat; top: 50%; cursor: pointer; height: 29px; opacity: 1; position: absolute; width: 29px; z-index: 999; left: 0px; color: #222; } <div id="full_image"> <ul><li><img src="'+img+'" /></a></li></ul> <a href="#" class="full_close"></a> <a href="#" class="button next_big"></a> <a href="#" class="button prev_big"></a> </div>
how i'm loading images.
$.each(get_org_images, function (i, img) { if (i > 0){ $('#full_image ul').append('<li><img src="' + img + '"/></li>');} });
i dont know mean with, "they show @ once". expect them do? maybe more info. help.
but, performance stuff like:
var parent = $('#full_image').find("ul"); $.each(get_org_images, function (i, img) { if (i > 0){ parent.append('<li><img src="' + img + '"/></li>');} });
dont have select each time parent in each. , $('#full_image').find("ul")
better selector $('#full_image ul')
you can that:
parent.append('<li><img style="display:none;" src="' + img + '"/></li>');} });
which .hide() do.
Comments
Post a Comment