I have the following http://jsbin.com/useqa4/10
My question is this: In the submenu I hover some li elements using the following
$(".submenuList li").hover(function () {
$(".submenuCurrent").removeClass("submenuCurrent");
$(this).addClass("submenuCurrent");
});
When I rollover on any of these the right section I want to change and show a specific div.
For example:
-
for the first li the div
#prasentRight -
for the second li the div
#elitRight -
for the third li the div
#suspendisseRight -
for the forth li the div
#laoreetRight
My difficult is that I don’t know how to get the current index of .submenuList li
Any help?
I think that this should work:
Shows the current index of the hovered-over list items in the
titleattribute of the element, demo at JS Bin.