Newbie: Event hover on object
Hi, as a newbie to jQuery (former using mootools) I have a question:
- <script language="JavaScript" type="text/javascript">
$(document).ready(function() {
var myNav=$('main-navigation');
console.log(myNav);
myNav.hover(function() { console.log('hover');
$('navi_overlay').removeClass('hidden');
$( 'navi_overlay' ).addClass('active');
});
});
</script>
The console says:
Object { length: 0, prevObject: Object, context: HTMLDocument → home.html, selector: "main-navigation" }
But no reaction on mouse over. 'hover' doesn´t appear in the console and the classes aren´t set.
Thanks for help and
with best regards