Q:

Dropdown Menu on WordPress runs only once

The site on WordPress with a lot of jquery js and such menu script:
function mainmenu() {
    $(" #navigation .menu ul ul ").css({display: "none"}); // Opera Fix

    $(" #navigation .menu li").hover(function() {
        $(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
    },function(){
        $(this).find('ul:first').css({visibility: "hidden"});
    });
}

$(document).ready(function(){                   
    mainmenu();
});

when loaded with WooCommerce plugin didn't show dropdown menu.
I started changing jquery versions on site from 1.3.2 and finished with 1.8.3 - the dropdown menu works now but only once (I mean drop down on hover). Please help to make it work as intended. Thanks. 

A:

No HTML provided, but all of the code above can be reduced to the following:
jQuery(function($) {
    $('#navigation .menu li').on('mouseenter', function() {
        $(this).find('> ul').show();
    }).on('mouseleave', function() {
        $(this).find('> ul').hide();
    })
});

(notice the first line uses jQuery, instead of $ in order to properly work with WordPress' noconflict, I've no idea how it works the first time 'though)
If that doesn't help, please provide some markup to get a better idea of the issue and check your console as already suggested.

