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 framework, rather than mixing the Prototype Frame work and the JQuery framework and use at the same time, as I worry there will be conflict and create side-effects.
So my question is: how to create Hash object/array using jquery?
Here is my function:
/* prototype framework, I want to change this to jQuery! */ var starSaves = new Hash(); function myHover(id, pos) { var starStrip = $('star_strip_' + id); if (starSaves.keys().indexOf(id) == -1) { 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.set(id, starSave); } }