View Full Version : A gerneral question

08-20-2007, 05:54 AM
Script: Featured Content Slider
URL: http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm

Is it possible to randomize which content it displays? EG if you had 10 DIV's in the external page, is it possible for the script to pick the content at random (whilst not repeating them until the cycle has completed?)

Probably not easy at all, but I was just curious to know what you thought. Would be an interesting addition, don't you think?!


08-20-2007, 06:46 AM
Please start a new thread for new inquires on this script. This just makes it easier for others who are having similar problems when stumbling upon it. I've moved your post to a new thread.

To answer your question, in general, yes. Inside contentslider.js, find and add to the line below:

slidernodes[sliderid].sort(function() {return 0.5 - Math.random()})

The code in red is new. Note that I'm using the default version of contentslider.js here. It should also work on your modified version, though I haven't tested it out yet.