PDA

View Full Version : حرکت اسلاید شو



zahraaaaaa
شنبه 17 اسفند 1392, 21:04 عصر
سلام همگی خسته نباشید
من یه اسلاید شو دارم که دکمه های قبلی وبعدیش به طور اتوماتیک کار نمیکنن وبایدخودم دستی بزنم رو دکمه ها......کسی میدونه باید چیکار کنم؟؟

zahraaaaaa
شنبه 17 اسفند 1392, 21:26 عصر
کسی نیس جواب بده؟؟

meysam1366
شنبه 17 اسفند 1392, 21:53 عصر
سلام دوست عزیز

خوب الان چه جوری باید به شما کمک بشه؟ :متفکر:

کدی چیزی؟

موفق باشید

zahraaaaaa
شنبه 17 اسفند 1392, 21:58 عصر
خب منتظر بودم یکی بیاد الان میذارم...ببخشید

zahraaaaaa
شنبه 17 اسفند 1392, 21:59 عصر
$(function(){

$('.slider').mobilyslider({
content: '.sliderContent',
children: 'div',
transition: 'horizontal',
animationSpeed: 500,
autoplay: false,
autoplaySpeed: 3000,
pauseOnHover: false,
bullets: true,
arrows: true,
arrowsHide: true,
prev: 'prev',
next: 'next',
animationStart: function(){},
animationComplete: function(){}
});

});

zahraaaaaa
شنبه 17 اسفند 1392, 22:01 عصر
این یکی از فایل های jsبود...

zahraaaaaa
شنبه 17 اسفند 1392, 22:04 عصر
/* ================================================== ========
* MobilySlider
* date: 20.1.2010
* author: Marcin Dziewulski
* last update: 02.02.2011
* web: http://www.mobily.pl or http://playground.mobily.pl
* email: hello@mobily.pl
* Free to use under the MIT license.
* ================================================== ======== */
(function($){$.fn.mobilyslider=function(options){v ar defaults={content:".sliderContent",children:"div",transition:"horizontal",animationSpeed:300,autoplay:false,autoplaySpeed:3 000,pauseOnHover:false,bullets:true,arrows:true,ar rowsHide:true,prev:"prev",next:"next",animationStart:function(){},animationComplete:fun ction(){}};var sets=$.extend({},defaults,options);return this.each(function(){var $t=$(this),item=$t.children(sets.content).children (sets.children),l=item.length-1,w=item.width(),h=item.height(),step=0,play,bulle ts,arrows,z,active,bullet;var slider={init:function(){slider.data();if(sets.bull ets){slider.bullets.create()}if(sets.arrows){slide r.arrows.create()}if(sets.autoplay){slider.autopla y()}slider.triggers()},data:function(){item.each(f unction(i){$(this).css("z-index",-(i-l))});if(sets.transition=="fade"){item.hide().eq(0).show()}},zindex:{prev:function (){step==l?item.eq(0).css("z-index",l+3):item.css("z-index",l+1);item.eq(step).css("z-index",l+4).next(item).css("z-index",l+2)},next:function(){item.css("z-index",l+1).eq(step).css("z-index",l+3).prev(item).css("z-index",l+2)},bullets:function(){item.css("z-index",l+1).eq(active).css("z-index",l+2);item.eq(step).css("z-index",l+3)},trigger:function(){if(z==1){slider.zindex.n ext()}else{if(z==-1){slider.zindex.prev()}else{if(z==0){slider.zinde x.bullets()}}}}},slide:{left:function(sign){sets.a nimationStart.call(this);item.eq(step).animate({le ft:sign+"="+w},sets.animationSpeed,function(){slider.zindex.t rigger()}).animate({left:0},sets.animationSpeed+20 0,function(){sets.animationComplete.call(this)})}, top:function(sign){sets.animationStart.call(this); item.eq(step).animate({top:sign+"="+h},sets.animationSpeed,function(){slider.zindex.t rigger()}).animate({top:0},sets.animationSpeed+200 ,function(){sets.animationComplete.call(this)})},f ade:function(){sets.animationStart.call(this);item .fadeOut(sets.animationSpeed).eq(step).fadeIn(sets .animationSpeed,function(){sets.animationComplete. call(this)})}},animation:{previous:function(){step ==0?step=l:step--;z=-1;switch(sets.transition){case"horizontal":slider.slide.left("-");break;case"vertical":slider.slide.top("+");break;case"fade":slider.slide.fade();break}},next:function(){step= =l?step=0:step++;z=1;switch(sets.transition){case"horizontal":slider.slide.left("+");break;case"vertical":slider.slide.top("-");break;case"fade":slider.slide.fade();break}}},autoplay:function(){ play=setInterval(function(){slider.animation.next( );if(sets.bullets){setTimeout(function(){slider.bu llets.update()},sets.animationSpeed+300)}},sets.au toplaySpeed)},pause:function(){clearInterval(play) },bullets:{create:function(){$t.append($("<div />").addClass("sliderBullets"));bullets=$t.find(".sliderBullets");for(i=0;i<=l;i++){bullets.append($("<a />").attr({href:"#",rel:i}).text(i))}},trigger:function(){bullet=bull ets.find("a");bullet.eq(0).addClass("active");bullet.click(function(){var b=$(this),rel=b.attr("rel");active=bullet.filter(".active").attr("rel");step=rel;sign=rel>active?"+":"-";z=0;if(!b.hasClass("active")){switch(sets.transition){case"horizontal":slider.slide.left(sign);break;case"vertical":slider.slide.top(sign);break;case"fade":slider.slide.fade();break}}bullet.removeClass("active");b.addClass("active");return false})},update:function(){bullet.removeClass("active").eq(step).addClass("active")}},arrows:{create:function(){$t.append($("<div />").addClass("sliderArrows"));arrows=$t.find(".sliderArrows");arrows.append($("<a />").attr("href","#").addClass(sets.prev).text("Previous"));arrows.append($("<a />").attr("href","#").addClass(sets.next).text("Next"))},trigger:function(){arrows.find("."+sets.prev).click(function(){slider.animation.prev ious();if(sets.bullets){slider.bullets.update()}re turn false});arrows.find("."+sets.next).click(function(){slider.animation.next ();if(sets.bullets){slider.bullets.update()}return false});if(sets.arrowsHide){arrows.hide();$t.hover (function(){arrows.show()},function(){arrows.hide( )})}}},triggers:function(){if(sets.arrows){slider. arrows.trigger()}if(sets.bullets){slider.bullets.t rigger()}if(sets.pauseOnHover){$t.hover(function() {slider.pause()},function(){slider.autoplay()})}}} ;slider.init()})}}(jQuery));

meysam1366
شنبه 17 اسفند 1392, 22:09 عصر
$(function(){

$('.slider').mobilyslider({
content: '.sliderContent',
children: 'div',
transition: 'horizontal',
animationSpeed: 500,
autoplay: false,
autoplaySpeed: 3000,
pauseOnHover: false,
bullets: true,
arrows: true,
arrowsHide: true,
prev: 'prev',
next: 'next',
animationStart: function(){},
animationComplete: function(){}
});

});



خواهش می کنم عذرخواهی لازم نیست

این کد رو


autoplay: false

به این صورت تغییر بدید ببینید درست میشه؟


autoplay: true

موفق باشید

zahraaaaaa
شنبه 17 اسفند 1392, 22:23 عصر
خییییییلی ممنون:لبخندساده:

meysam1366
شنبه 17 اسفند 1392, 22:28 عصر
خواهش می کنم

الحمدالله درست شد؟

zahraaaaaa
شنبه 17 اسفند 1392, 22:40 عصر
بله درست شد....بازم ممنون