Passing parameters into hover function
I am using jQuery UI hover function, the following code snippet is working but not quite what I want:
$('#mainMenu img').hover(mouseIn, mouseO
ut);
function mouseIn() {
//.....
}
function mouseOut() {
//.....
}
what I want is to pass 'mainMenu' as a parameter into mouseIn and mouseOut functions, so the functions should look like:
function mouseIn(menuName) {
//.....
}
function mouseOut(menuName) {
//.....
}
but the following is not working:
$('#mainMenu img').hover(mouseIn('mainMenu'), mouseO
ut('mainMenu'));
How do I accomplish this?
TIA