javascript - Jquery - Maximum call stack on animation callback? -


this last shot @ fixing project before throw in toilet. slider pulls data images within slide-data container. styles css classes when applies div. question why getting "maximum call stack size exceeded" when run this? i'm using animation callbacks there should no issue. either way exiting function return aswell. i'm not sure whats going on.

please ignore global vars , commented sections have been trying many solutions issue.

completed slider script cares.

js (requires jquery & jquery ui effects):

var dt=5000; //set determine slide delay time  function transitionslides(){c++;if(c<=i){$(".slide-holder").toggle("slide",{direction:"right"},"fast");return changebackground()}else{c=0;return transitionslides()}}function changebackground(){var e=c.tostring();var t=$("#slide"+e).attr("title");var n=$("#slide"+e).attr("src");$(".slide-holder").css("background","url("+n+") no-repeat").html(t).delay(dt).toggle("slide",{direction:"left"},"fast",transitionslides)}var c=0;var i=new number;$(document).ready(function(e){i=$(".slide-data").children("img").length;transitionslides()}) 

css:

.slide-holder {     font-family: /* slide font */         font-size:40px;     text-align:center;     color:#fff;     text-shadow:2px 2px 3px #000; } .slide-data, .slides {     display:none; } .slide-frame, .slide-holder { /* slide-frame keeps page jarring , down when slide-holder exits */     height:325px;     width:800px; } 

html markup example:

<div class="slide-frame"> <div class="slide-holder"></div> <div class="slide-data"> <img src="images/slides/slide1.png" class="slides" id="slide1" width="800" height="325" alt="empowering startups" title="slide text one" /> <img src="images/slides/slide2.png" class="slides" id="slide2" width="800" height="325" title="this test" /> <img src="images/slides/slide3.png" class="slides" id="slide3" width="800" height="325" title="this test" /> <img src="images/slides/slide4.png" class="slides" id="slide4" width="800" height="325" title="testing last 1 too." /> </div> </div> 

you calling transitionslides instead of passing callback. remove ().

$(".slide-holder").delay(4000).toggle("slide", { direction: "left"}, "fast", transitionslides) 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -