I know there is a Hash() object in the Javascript prototype framework, but is there anything in Jquery like this?
As I would like to stick with one javascript framew
There's a standalone hash table implementation called jshashtable (full disclosure: I wrote it). Using it, your code would be:
var starSaves = new Hashtable();
function myHover(id, pos)
{
var starStrip = $('star_strip_' + id);
if (!starSaves.containsKey(id))
{
var starSave = new Array();
var imgs = starStrip.select("img")
alert(imgs);
for (var i = 0; i < imgs.length; i++)
{
starSave[starSave.length] = imgs[i].src;
if (i < pos)
imgs[i].src = "/images/star_1.gif";
else
imgs[i].src = "/images/star_0.gif";
}
starSaves.put(id, starSave);
}
}