Problem:
I am creating a "teaser page" for a site that is coming soon. We have
a list of 20 sentences that describe the site. We want to select 5 of
those, at random and without redundancy, and display them in a div.
The display part seems easy enough, and should look something like
this:

$(document).ready() {
  $("quote_box").append(quote_array)
}

However, I cannot seem to find any information about randomly loading
an array y out of an array x, in jQuery or otherwise. I would like for
the script to load array 'x' (the larger array) from an external plain
ASCII file with a semi-colon delimiter, but JSON looks like a good
compromise. At any rate, I am just looking for an example of "loading"
array y from array x. Filling up x from an external file I can figure
out for myself. Coming from a Perl background, I thought things could
only get less confusing... ;)


 (I've searched far and wide for an example of this, but it doesn't
seem to exist. I will blog any suggestions you make so that you won't
be troubled by such newbishness ever again).

Reply via email to