javascript - selected link changes background -


i have 2 menus, category , countries. i've made far change , keep background of 1 element have problem simultaneous memory of other menu's element.

var lookaround=[];  function seleitem(obj,color){     if(lookaround[obj.classname])         lookaround[obj.classname].style.background=null;     lookaround[obj.classname]=obj;     obj.style.background=color; } 

example page here

you should use object instead of array lookaround:

var lookaround = {}; 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -