1) Script Title: Ultimate Fade-in slideshow (v1.5)
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm
3) Describe problem:
I have read through the code and all of it makes sense, except I am stuck on one part. Could someone please explain the logic behind the cacheobj in fadeshow.prototype.rotateimage:
Specifically, why create a new var cacheobj rather than simply use 'this' in setTimeout()?Code:// If pause onMouseover enabled, cache object if(this.pausecheck == 1) { var cacheobj = this; } if(this.mouseovercheck == 1) { setTimeout(function(){cacheobj.rotateimage()}, 100); }



Reply With Quote

Bookmarks