Auto Moving Submenu Using jQuery

by barkkathulla 2013-04-15 19:39:19

Auto Moving Submenu Using jQuery

Form design page


Contain ul(unordered list) and li(list item),each li consists of onmouseover=parentmenu(1,1) onmouseout=hideall(1),
Onmouse events are used to select and deselect menus based on our requirement...Here ul contain a class name...


Submenu contains the following:
class="submenu-wrapperss" onmouseover=parentmenu(1,3) onmouseout=hideall(1) and having div id,class
e.g:submenu-wrapperss...and id="submenu-wrapper13"


Jquery

function parentmenu(cid,jj)
{
menu = $('.menu li').length;
submenuWrapper = $('#submenu-wrapper'+cid+jj).attr('id');
for(ii=1;ii<=3;ii++)
$('#submenu-wrapper'+cid+ii).hide();
showsubmenu(submenuWrapper);
}
function showsubmenu(item) {
$("#"+item).show().css('margin-top','-20px');
}
function hideall(cid,jj)
{
for(ii=1;ii<=menu;ii++)
$('#submenu-wrapper'+cid+ii).hide();
}


part of css
.menu li:hover, .selected {
background: #6a3b16;
}

.menu a, .menu a:visited {
color: #fff;
text-decoration: none;
}
994
like
0
dislike
0
mail
flag

You must LOGIN to add comments