presistence menu jquery
presistence menu jquery
-
var $_GET = [];
var vars_area = location.search.substring(1);
if(vars_area.length > 2)
{
var get_sets = vars_area.split('&');
for(i = 0, k = get_sets.length; i < k; i++)
{
var parts = get_sets[i].split('=');
$_GET[unescape(parts[0])] = unescape(parts[1]);
}
}
http://jasity.awardspace.com/menutesting/menu.html?lvl2=mn1&lvl3=mn11&lvl4=mn111
ok the above code is supposed to do what PHP $_GET[''] does but i cannot seem to get it to work
the idea is to use this in conjunction with jquery to find the id's # in the UL #Navi and make them visible but i cant seem to get it to work what i want to do is create a array that stores each of the $_GET so something like
-
mn['1'] = lvl2
mn['2'] = lvl3
mn['3'] = lvl4
var i = 0
while (i < mn[i]){
//find the a href where the mn[i] is and show that field with .show()
i++;
}
but as you can see it just doesn't work but what it should do is look for the if #mn[i] and set it to visible when the page loads so it is a persistent menu that its good enough for now eventually i will need to work out a way so that i can remove the $_GET at the end of the url but dont have the time to work it out right now