admin管理员组文章数量:1325954
I am trying to get this gallery to automatically move, but i cant find the mand to do so in the script. Maybe i am missing something? Here is the script.
This is the script
.slidingGallery-1.2.min.js
I am using this script
.aspx
I am using this to call the script to work. But i am unable of the function here to make it automatically slide without clicking.
<script language="javascript" type="text/javascript">
$(function() {
$('div.gallery img').slidingGallery({
Lwidth: 400,
Lheight: 300,
Lshrink: function(dim) { return dim * 0.5; },
gutterWidth: -8,
container: $('div.gallery')
});
});
</script>
I am trying to get this gallery to automatically move, but i cant find the mand to do so in the script. Maybe i am missing something? Here is the script.
This is the script
http://syndicatebox./jquery.slidingGallery-1.2.min.js
I am using this script
http://www.meadmiracle./SlidingGallery.aspx
I am using this to call the script to work. But i am unable of the function here to make it automatically slide without clicking.
<script language="javascript" type="text/javascript">
$(function() {
$('div.gallery img').slidingGallery({
Lwidth: 400,
Lheight: 300,
Lshrink: function(dim) { return dim * 0.5; },
gutterWidth: -8,
container: $('div.gallery')
});
});
</script>
Share
Improve this question
edited Nov 29, 2011 at 6:16
fnp
6,1983 gold badges35 silver badges43 bronze badges
asked Nov 21, 2011 at 5:54
soniccoolsoniccool
6,05823 gold badges63 silver badges101 bronze badges
2
- I dont think this script has autoSliding feature – Sudhir Bastakoti Commented Nov 21, 2011 at 6:04
- Hmm is there any way i can implement it? – soniccool Commented Nov 21, 2011 at 6:07
4 Answers
Reset to default 8 +250I am cross-posting my answer from https://stackoverflow./q/8250488/128165
<script type="text/javascript">
var autoSlideInterval;
function start_autoslide(){
autoSlideInterval = setInterval( function(){
$.galleryUtility.slideLeft() ;
}, 5000);
}
function stop_autoslide(){
clearInterval( autoSlideInterval );
}
$(function() {
$('div.gallery img').slidingGallery();
start_autoslide();
});
</script>
Not sure what else you are looking for with your bounty, but my remendation is to use a carousel that does exactly what you want.
I have had nothing but good experiences with http://caroufredsel.frebsite.nl/. The author is quick to answer questions, add features, and even has a setup wizard to get the slideshow going with almost zero manual configuration.
There are options for it to be circular, infinite, auto-play, keyboard driven, pause-on-hover, set cookies, changes directions, etc etc.
I'm not involved with the project at all, but this is the only gallery I'll use for my work.
Call these methods yourself?
$.galleryUtility.slideRight( )
$.galleryUtility.slideLeft( )
since it's Jquery, you can use "stepcarousel.js" → http://www.dynamicdrive./dynamicindex4/stepcarousel.htm then you can include this line of code in your script to invoke the auto function.
autostep: {enable: true, moveby:1, pause:5000},
hope this helps...
本文标签: javascriptHow to get gallery to automatically moveStack Overflow
版权声明:本文标题:javascript - How to get gallery to automatically move - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742190942a2430200.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论