I'm Stuck - jQuery jMenu
I'm Stuck - jQuery jMenu
Hello! I have this code on meu page:
-
<!-- JavaScript -->
<script type="text/javascript">
$(function(){
// BUTTONS
$('.fg-button').hover(
function(){ $(this).removeClass('ui-state-default').addClass('ui-state-focus'); },
function(){ $(this).removeClass('ui-state-focus').addClass('ui-state-default'); }
);
// MENUS
$('#aplicacoes').menu({
content: $('#aplicacoes').next().html(), // grab content from this page
showSpeed: 400,
positionOpts: {
posX: 'left',
posY: 'bottom',
offsetX: 0,
// Define a distância entre o Pai->Filho (Menu e Conteúdo)
offsetY: 10,
directionH: 'right',
directionV: 'down',
detectH: true, // do horizontal collision detection
detectV: true, // do vertical collision detection
linkToFront: false
}
});
// or from an external source
$.get('menuContent.html', function(data){ // grab content from another page
$('#servicos').menu({ content: data });
});
$('#servicos').menu({
content: $('#servicos').next().html(), // grab content from this page
showSpeed: 400,
positionOpts: {
posX: 'left',
posY: 'bottom',
offsetX: 0,
// Define a distância entre o Pai->Filho(Menu e Conteúdo)
offsetY: 10,
directionH: 'right',
directionV: 'down',
detectH: true, // do horizontal collision detection
detectV: true, // do vertical collision detection
linkToFront: false
}
});
});
<!-- HTML -->
<div id="menu1" style="margin-top: 100px">
<a id="aplicacoes"
href="#aplicacoes"
class="fg-button fg-button-icon-right ui-widget ui-state-default ui-corner-all"
tabindex="0">
<span class="ui-icon ui-icon-triangle-1-s"></span>
Aplicações
</a>
<div id="aplicacoes" class="hidden">
<ul>
<li><a href="#">GWT Teste</a></li>
<li><a href="#">JSF 2.0</a></li>
<li><a href="#">HTML5 + CSS3</a></li>
<li><a href="#">jQuery (jGrid, jMenu, FancyBox)</a></li>
<li><a href="#">Servlet + JSP</a></li>
</ul>
</div>
</div>
The open Menu just when i click. I want that the menu open when the mouse over. How?
Thankx!