I was working on ‘ul-li’ structure in which I wanted to
- show 2nd li when 1st li is focused and
- hide it when 1st lose focus.
So I went for a work around that uses ‘mouseenter’ and ‘mouseleave’
events for ‘focus’ and ‘blur’ events respectively. This events can be used for ‘li’,
‘a’ as well as ‘div’ elements. IE7, 8, 9, Chrome and Firefox support these
events. Below is the code that I have used.
$("#myFirstLiElement").mouseenter(function () {
$("#mySecondLiElement").show();
}).mouseleave(function () {
$("#mySecondLiElement").hide();
});

0 comments:
Post a Comment